Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Socks5types;
- interface
- type TPackedSockets = record
- InternetSocket : TClientSocket;
- InterfaceSocket : TClientSocket;
- end;
- type TSocksAuth = record
- Version : Byte;
- nMethods: Byte;
- Methods: Array [0..255] of Byte;
- end;
- type TSocksSelectedMethod = record
- Version: Byte;
- Method: Byte;
- end;
- type TSocksSettings = record
- Port: DWORD;
- Username: String;
- Password: String;
- end;
- type TSocksRequest = record
- Version: Byte;
- Command: Byte; // 1 = Connect, 2 = BIND (not Supported)
- Reserved: Byte;
- AddressType: Byte; // 1 = IPv4 Address, 3 Domainname, 4=Ipv6 Address)
- end;
- type TSocksTargetDataIPv4 = record
- destAddress: Array [0..3] of Byte; // wenn IPv4 die ip, ansonsten das erste bytelänge
- end;
- type TSocksTargetDataDomainLength = record
- destAddressLength: Byte;
- end;
- type TSocksTargetDataDomain = record
- destAddress: Array of Byte;
- end;
- type TSocksTargetPort = record
- destPort: Array [0..1] of Byte;
- end;
- type TSocksReply = record
- Version: Byte;
- ReplyType: Byte; // 1 ReplySuccess, 2 Failure
- reserved: Byte;
- addresstype: Byte; //siehe Request
- sboundaddr: Array [0..3] of Byte;
- sboundport: Array [0..1] of Byte;
- end;
- const SOCKS_AddressType_IPv4 = 1;
- const SOCKS_AddressType_Domain = 3;
- const SOCKS_AddressType_IPv6 = 4;
- const SOCKS_COMMAND_Connect = 1;
- const SOCKS_COMMAND_Bind = 2;
- const SOCKS_ReplyType_Success = 1;
- const SOCKS_ReplyType_Failure = 2;
- const SOCKS_SelectedMethod_NOAUTH = 0;
- const SOCKS_AUTHSTATE_supportedmethods = 1;
- const SOCKS_AUTHSTATE_request = 2;
- const SOCKS_AUTHSTATE_req_allowed = 3;
- const SOCKS_AUTHSTATE_Tunneling = 4;
- implementation
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement