Browse Source

Add proxying tools

master
mid-kid 4 weeks ago
parent
commit
412d755801
  1. 6
      .gitmodules
  2. 1
      proxy/microsocks
  3. 26
      proxy/microsocks.patch
  4. 1
      proxy/proxychains-ng
  5. 11
      proxy/proxychains-ng.patch

6
.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

1
proxy/microsocks

@ -0,0 +1 @@
Subproject commit 98421a21c4adc4c77c0cf3a5d650cc28ad3e0107

26
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 */

1
proxy/proxychains-ng

@ -0,0 +1 @@
Subproject commit 1760c9347473365394226f176588c3c7e0684dd9

11
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
Loading…
Cancel
Save