GCDAsyncSOCKSProxySocket.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // GCDAsyncSOCKSProxySocket.h
  3. //
  4. // Copyright © 2019 Threema GmbH. All rights reserved.
  5. // Derived from ProxyKit, Copyright (c) 2014 Chris Ballinger
  6. //
  7. #include "GCDAsyncSocket.h"
  8. typedef NS_ENUM(int16_t, GCDAsyncSocketSOCKSVersion) {
  9. GCDAsyncSocketSOCKSVersion4 = 0, // Not implemented
  10. GCDAsyncSocketSOCKSVersion4a, // Not implemented
  11. GCDAsyncSocketSOCKSVersion5 // WIP
  12. };
  13. @interface GCDAsyncSOCKSProxySocket : GCDAsyncSocket <GCDAsyncSocketDelegate>
  14. // SOCKS proxy settings
  15. @property (nonatomic, strong, readonly) NSString *proxyHost;
  16. @property (nonatomic, readonly) uint16_t proxyPort;
  17. @property (nonatomic, readonly) GCDAsyncSocketSOCKSVersion proxyVersion;
  18. @property (nonatomic, strong, readonly) NSString *proxyUsername;
  19. @property (nonatomic, strong, readonly) NSString *proxyPassword;
  20. /**
  21. * SOCKS Proxy settings
  22. **/
  23. - (void) setProxyHost:(NSString*)host port:(uint16_t)port version:(GCDAsyncSocketSOCKSVersion)version;
  24. - (void) setProxyUsername:(NSString *)username password:(NSString*)password;
  25. @end