|
@ -1,5 +1,5 @@ |
|
|
diff --git a/sockssrv.c b/sockssrv.c
|
|
|
diff --git a/sockssrv.c b/sockssrv.c
|
|
|
index dbad9c2..f9e2b89 100644
|
|
|
index dbad9c2..b9c4a31 100644
|
|
|
--- a/sockssrv.c
|
|
|
--- a/sockssrv.c
|
|
|
+++ b/sockssrv.c
|
|
|
+++ b/sockssrv.c
|
|
|
@@ -155,8 +155,11 @@ static int connect_socks_target(unsigned char *buf, size_t n, struct client *cli
|
|
|
@@ -155,8 +155,11 @@ static int connect_socks_target(unsigned char *buf, size_t n, struct client *cli
|
|
@ -10,7 +10,7 @@ index dbad9c2..f9e2b89 100644 |
|
|
/* there's no suitable errorcode in rfc1928 for dns lookup failure */ |
|
|
/* there's no suitable errorcode in rfc1928 for dns lookup failure */ |
|
|
- if(resolve(namebuf, port, &remote)) return -EC_GENERAL_FAILURE;
|
|
|
- if(resolve(namebuf, port, &remote)) return -EC_GENERAL_FAILURE;
|
|
|
+ if(port == 80) port = 25564;
|
|
|
+ if(port == 80) port = 25564;
|
|
|
+ if(port != 25564) return -EC_GENERAL_FAILURE;
|
|
|
+ if(port != 25564 && port != 25565) return -EC_GENERAL_FAILURE;
|
|
|
+ if(resolve("127.0.0.1", port, &remote)) return -EC_GENERAL_FAILURE;
|
|
|
+ if(resolve("127.0.0.1", port, &remote)) return -EC_GENERAL_FAILURE;
|
|
|
struct addrinfo* raddr = addr_choose(remote, &bind_addr); |
|
|
struct addrinfo* raddr = addr_choose(remote, &bind_addr); |
|
|
int fd = socket(raddr->ai_family, SOCK_STREAM, 0); |
|
|
int fd = socket(raddr->ai_family, SOCK_STREAM, 0); |
|
|