20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import "OFConnectionFailedException.h"
/* Reference for static linking */
int _OFTCPSocket_SOCKS5_reference;
@implementation OFTCPSocket (SOCKS5)
- (void)_SOCKS5ConnectToHost: (OFString*)host
port: (uint16_t)port
{
const char request[] = { 5, 1, 0, 3 };
char reply[256];
BOOL oldWriteBufferEnabled;
/* 5 1 0 -> no authentication */
[self writeBuffer: request
|
|
|
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import "OFConnectionFailedException.h"
/* Reference for static linking */
int _OFTCPSocket_SOCKS5_reference;
@implementation OFTCPSocket (SOCKS5)
- (void)OF_SOCKS5ConnectToHost: (OFString*)host
port: (uint16_t)port
{
const char request[] = { 5, 1, 0, 3 };
char reply[256];
BOOL oldWriteBufferEnabled;
/* 5 1 0 -> no authentication */
[self writeBuffer: request
|