From 412d755801e525b46ef91ee0aef0e334ca789868 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 25 Oct 2024 23:45:47 +0200 Subject: [PATCH] Add proxying tools --- .gitmodules | 6 ++++++ proxy/microsocks | 1 + proxy/microsocks.patch | 26 ++++++++++++++++++++++++++ proxy/proxychains-ng | 1 + proxy/proxychains-ng.patch | 11 +++++++++++ 5 files changed, 45 insertions(+) create mode 100644 .gitmodules create mode 160000 proxy/microsocks create mode 100644 proxy/microsocks.patch create mode 160000 proxy/proxychains-ng create mode 100644 proxy/proxychains-ng.patch diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..db9a0c8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "proxy/microsocks"] + path = proxy/microsocks + url = https://github.com/rofl0r/microsocks +[submodule "proxy/proxychains-ng"] + path = proxy/proxychains-ng + url = https://github.com/rofl0r/proxychains-ng diff --git a/proxy/microsocks b/proxy/microsocks new file mode 160000 index 0000000..98421a2 --- /dev/null +++ b/proxy/microsocks @@ -0,0 +1 @@ +Subproject commit 98421a21c4adc4c77c0cf3a5d650cc28ad3e0107 diff --git a/proxy/microsocks.patch b/proxy/microsocks.patch new file mode 100644 index 0000000..f6c30a9 --- /dev/null +++ b/proxy/microsocks.patch @@ -0,0 +1,26 @@ +diff --git a/sockssrv.c b/sockssrv.c +index dbad9c2..f9e2b89 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 + } + unsigned short port; + port = (buf[minlen-2] << 8) | buf[minlen-1]; ++ dolog("client[%d]: resolving %s:%d\n", client->fd, namebuf, port); + /* 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(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); + if(fd == -1) { +@@ -412,7 +415,7 @@ int main(int argc, char** argv) { + int ch; + const char *listenip = "0.0.0.0"; + char *p, *q; +- unsigned port = 1080; ++ unsigned port = 25560; + while((ch = getopt(argc, argv, ":1qb:i:p:u:P:w:")) != -1) { + switch(ch) { + case 'w': /* fall-through */ diff --git a/proxy/proxychains-ng b/proxy/proxychains-ng new file mode 160000 index 0000000..1760c93 --- /dev/null +++ b/proxy/proxychains-ng @@ -0,0 +1 @@ +Subproject commit 1760c9347473365394226f176588c3c7e0684dd9 diff --git a/proxy/proxychains-ng.patch b/proxy/proxychains-ng.patch new file mode 100644 index 0000000..32380ff --- /dev/null +++ b/proxy/proxychains-ng.patch @@ -0,0 +1,11 @@ +diff --git a/src/proxychains.conf b/src/proxychains.conf +index 2502368..b31a77f 100644 +--- a/src/proxychains.conf ++++ b/src/proxychains.conf +@@ -158,5 +158,5 @@ tcp_connect_time_out 8000 + # add proxy here ... + # meanwile + # defaults set to "tor" +-socks4 127.0.0.1 9050 ++socks5 127.0.0.1 25560 +