Đang Thực Hiện

SOCKS5 User Authentication and IP Bind problem!

My project working (without user authentication and with lan default ip)

[url removed, login to view] bind problem. i've several ip addresses. All of the incoming connections was bind to default ip. how can do bind any ip without default ip?

[url removed, login to view] i have used SOCKS_AUTH project confused.

any body help me? thanks

here is part of my code.

NetworkStream socksClientStream = [url removed, login to view]();

/*

* supported methods part

*/

byte[] authFields = new byte[2];

[url removed, login to view](authFields, 0, 2);

// read n supported methods

byte[] methods = new byte[authFields[1]];

[url removed, login to view](methods, 0, [url removed, login to view]);

/*

* method selection part

*/

byte[] selectedAuthMethod = { SOCKS_VERSION, SOCKS_NOAUTH };

[url removed, login to view](selectedAuthMethod, 0, 2);

// return version and auth method "no auth"

byte[] requestFields = new byte[4];

[url removed, login to view](requestFields, 0, 4);

// adresstypes ipv4 and hostname are supported

string connection_target = "";

int target_port;

if (requestFields[3] == SOCKS_IPV4ADDR )

{

//ip4v adress is requested

byte[] target_data = new byte[4];

[url removed, login to view](target_data, 0, 4);

IPAddress ip = new IPAddress(target_data);

connection_target = [url removed, login to view]();

}

else if (requestFields[3] == SOCKS_DNSNAME )

{

byte[] domainname_length = new byte[1];

[url removed, login to view](domainname_length, 0, 1);

byte[] target_data = new byte[domainname_length[0]];

[url removed, login to view](target_data, 0, domainname_length[0]);

connection_target = [url removed, login to view](target_data);

}

else

{

//unsupported addresstype

}

//if requested address is supported

if (connection_target != "")

{

/*

* server client connection part

*/

//doc: byteorder

byte[] bintargetport = new byte[2];

[url removed, login to view](bintargetport, 0, 2);

byte[] tmp_byteorder = new byte[2];

tmp_byteorder[0] = bintargetport[1];

tmp_byteorder[1] = bintargetport[0];

target_port = (int)[url removed, login to view](tmp_byteorder, 0);

serverClient = new TcpClient(connection_target, target_port);

/* **

* reply part

*/

if ([url removed, login to view])

{

// reply successful audience

byte[] reply = new byte[10];

//version

reply[0] = SOCKS_VERSION ;

// replycode

reply[1] = SOCKS_REPLYSUCCESS ;

//reserved and 0

reply[2] = 0;

// addresstype

reply[3] = 1;

string ip = [url removed, login to view]().Split(':')[0];

IPAddress ipaddr = [url removed, login to view](ip);

reply[4] = [url removed, login to view]()[0];

reply[5] = [url removed, login to view]()[1];

reply[6] = [url removed, login to view]()[2];

reply[7] = [url removed, login to view]()[3];

int port = [url removed, login to view]([url removed, login to view]().Split(':')[1]);

reply[8] = [url removed, login to view]((UInt16)port)[0];

reply[9] = [url removed, login to view]((UInt16)port)[1];

[url removed, login to view](reply, 0, 10);

/*

* tcp redirection

*/

NetworkStream serverClientStream = [url removed, login to view]();

bool ioError = false;

while ([url removed, login to view] && [url removed, login to view] && !ioError )

{

..

}

project has attached. u can try and test it

Kỹ năng: Lập trình C#

Xem thêm: the string problem, string problem, selection problem, part problem, parse programming, no problem part 1, else if c programming, tcp ip, tcp / ip, ipv4, ip tcp, bind, server requested authentication, socks5 code, tcp redirection, tcp help, client server encoding, unsupported, tcp connections, tcp connection programming, server socks5, bind server, body socks, working project user authentication, socks5 client

Về Bên Thuê:
( 1 nhận xét ) Turkey, Turkey

Mã Dự Án: #4551014

Đã trao cho:

vfeBrian

Please check my PM, I can do it

$30 USD trong 1 ngày
(8 Đánh Giá)
3.3

2 freelancer đang chào giá trung bình $45 cho công việc này

karimzadehnaser

i can do it

$60 USD trong 3 ngày
(0 Đánh Giá)
0.0