Last active
June 6, 2022 17:19
-
-
Save diyism/d7c8905040a1010d55a278ef1d1a4f40 to your computer and use it in GitHub Desktop.
naive proxy quic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ssh into your vps: | |
wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz | |
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz | |
cd /root/ ; nano ./profile #add "export PATH=$PATH:/usr/local/go/bin" | |
exit | |
#ssh into your vps again | |
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest | |
${GOPATH}/bin/xcaddy build --with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive | |
Caddyfile in server(installed latest github.com/klzgrad/forwardproxy@naive): | |
{ | |
servers { | |
protocol { | |
experimental_http3 | |
} | |
} | |
} | |
:443, https://myserver.com { | |
route { | |
forward_proxy { | |
basic_auth user1 user1pass1 | |
hide_ip | |
hide_via | |
probe_resistance secret.com | |
} | |
respond / "Hello, world!" | |
} | |
} | |
in local debian(downloaded latest naiveproxy-v89.0.4389.72-1-linux-x64): | |
visit https://myserver.com in firefox, I can see log under Developer/Network: | |
HTTP/3 200 OK | |
server: Caddy | |
alt-svc: h3-32=":443"; ma=2592000,h3-29=":443"; ma=2592000 | |
#In local debian: | |
while true; do nohup /usr/bin/naive --listen=socks://127.0.0.1:8081 --proxy=quic://user1:[email protected] > /dev/null 2>&1; sleep 1; done & | |
#test socks5 proxy: | |
time curl --socks5 127.0.0.1:8081 https://1.1.1.1 | head -n 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment