Hello i need help
chaodada opened this issue · 0 comments
Can this program implement https proxy to socks5 proxy?
I currently have https proxy
The format is like this https://xxxx.com:443
I need to convert it to socks5 to work. I tried your code but it doesn't work
The configuration file is as follows:
{
"log": {
"dir": "/tmp/socks-over-https",
"level": "debug"
},
"settings": {
"readBufferSize": 4096,
"writeBufferSize": 4096
},
"proxies": [
{
"socks": {
"address": "0.0.0.0",
"port": 19999
},
"http": {
"address": "xxxxxx.com",
"port": 1443,
"user": "",
"pass": ""
}
},
{
"socks": {
"address": "0.0.0.0",
"port": 19991,
"user": "",
"pass": ""
},
"http": {
"address": "xxxxxx.com",
"port": 1443
}
}
]
}
error——log
chaodada@MacBook-Pro socks-over-https-master % ./main
2:49AM DBG start socks5 proxy on 0.0.0.0:19999 via mc1-2.0u0d.xyz:1443 service=socks-over-https who=MGR
2:49AM DBG start socks5 proxy on 0.0.0.0:19991 via mc1-2.0u0d.xyz:1443 service=socks-over-https who=MGR
2:49AM DBG tunnel to 54.85.240.191:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 54.85.240.191:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 216.239.32.116:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61755: write tcp 127.0.0.1:19999->127.0.0.1:61755: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61759: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 216.239.32.116:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 54.166.248.40:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 34.231.165.96:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 103.235.46.39:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 103.235.46.39:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 203.56.69.36:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 123.129.234.32:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 216.239.32.116:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61768: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 103.235.46.39:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 103.235.46.39:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 203.56.69.36:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 123.129.234.32:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61770: write tcp 127.0.0.1:19999->127.0.0.1:61770: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 216.239.32.116:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61767: write tcp 127.0.0.1:19999->127.0.0.1:61767: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61769: write tcp 127.0.0.1:19999->127.0.0.1:61769: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 203.208.43.66:80 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61783: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61777: write tcp 127.0.0.1:19999->127.0.0.1:61777: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61778: write tcp 127.0.0.1:19999->127.0.0.1:61778: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61781: write tcp 127.0.0.1:19999->127.0.0.1:61781: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61787: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 114.250.70.34:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 114.250.70.34:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61795: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 35.174.210.7:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 35.174.210.7:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19999->127.0.0.1:61799: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 172.217.31.238:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 172.217.31.238:443 from socks5://0.0.0.0:19999 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61801: write tcp 127.0.0.1:19999->127.0.0.1:61801: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 34.231.165.96:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19999->127.0.0.1:61803: write tcp 127.0.0.1:19999->127.0.0.1:61803: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19999
2:49AM DBG tunnel to 199.96.62.41:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 199.96.62.41:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:49AM DBG tunnel to 34.231.165.96:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61811: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 203.208.43.66:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 203.208.43.66:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 108.160.165.173:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 108.160.165.173:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61821: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 108.160.165.173:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 203.208.43.66:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 203.208.43.66:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61826: write tcp 127.0.0.1:19991->127.0.0.1:61826: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 129.226.191.192:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 129.226.191.192:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61831: write tcp 127.0.0.1:19991->127.0.0.1:61831: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61833: write tcp 127.0.0.1:19991->127.0.0.1:61833: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 108.160.165.173:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61839: write tcp 127.0.0.1:19991->127.0.0.1:61839: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 34.231.165.96:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 34.231.165.96:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 203.208.43.66:80 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61843: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61845: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61847: write tcp 127.0.0.1:19991->127.0.0.1:61847: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61853: write tcp 127.0.0.1:19991->127.0.0.1:61853: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 54.86.205.189:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.86.205.189:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61866: write tcp 127.0.0.1:19991->127.0.0.1:61866: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61870: write tcp 127.0.0.1:19991->127.0.0.1:61870: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61868: write tcp 127.0.0.1:19991->127.0.0.1:61868: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61872: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 44.196.232.158:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 44.196.232.158:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61874: write tcp 127.0.0.1:19991->127.0.0.1:61874: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:50AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61884: write tcp 127.0.0.1:19991->127.0.0.1:61884: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 35.169.187.184:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61886: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 35.169.187.184:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 172.217.160.78:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 172.217.160.78:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61890: write tcp 127.0.0.1:19991->127.0.0.1:61890: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61892: write tcp 127.0.0.1:19991->127.0.0.1:61892: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 58.251.110.115:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 129.226.191.192:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61894: write tcp 127.0.0.1:19991->127.0.0.1:61894: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61896: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 129.226.191.192:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM DBG tunnel to 114.250.70.34:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61898: write tcp 127.0.0.1:19991->127.0.0.1:61898: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61901: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 114.250.70.34:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61904: write tcp 127.0.0.1:19991->127.0.0.1:61904: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: read tcp 127.0.0.1:19991->127.0.0.1:61906: read: connection reset by peer service=socks-over-https who=socks5://0.0.0.0:19991
2:51AM DBG tunnel to 54.173.95.250:443 from socks5://0.0.0.0:19991 service=socks-over-https who=https://mc1-2.0u0d.xyz:1443
2:51AM ERR socks: Failed to handle request: readfrom tcp 127.0.0.1:19991->127.0.0.1:61908: write tcp 127.0.0.1:19991->127.0.0.1:61908: write: broken pipe service=socks-over-https who=socks5://0.0.0.0:19991