Browse Source

Patch the minecraft connection through microsocks

master
mid-kid 4 weeks ago
parent
commit
9fd107a629
  1. 4
      proxy/microsocks.patch

4
proxy/microsocks.patch

@ -1,5 +1,5 @@
diff --git a/sockssrv.c b/sockssrv.c
index dbad9c2..f9e2b89 100644
index dbad9c2..b9c4a31 100644
--- a/sockssrv.c
+++ b/sockssrv.c
@@ -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 */
- if(resolve(namebuf, port, &remote)) return -EC_GENERAL_FAILURE;
+ 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;
struct addrinfo* raddr = addr_choose(remote, &bind_addr);
int fd = socket(raddr->ai_family, SOCK_STREAM, 0);

Loading…
Cancel
Save