klzgrad / naiveproxy

Make a fortune quietly
BSD 3-Clause "New" or "Revised" License
6.68k stars 885 forks source link

Questions about adding upstream in Caddyfile #203

Closed xh116 closed 3 years ago

xh116 commented 3 years ago

I have two VPSs , all running caddy server with your modified forwardproxy. One located in Singapore which allow to unblock Netflix bought movies. But speed seems limited less than 10Mb/s when using China telecom. Another located in USA, which has stable speed more than 50Mb/s. So I tried to add upstream https://sg-user:sg-passwd@sg-url.com in Caddyfile. When I connect to the server in USA, I can get stable speed and unblock the Netflix also.

Is this way still safe (camouflage traffic with strong censorship resistance and low detectability) ?

Or any better suggestions?

klzgrad commented 3 years ago

This setting routes all traffic from USA server to singapore server. Is this necessary?

You can create two naiveproxy client instances connected to your two servers and use browser extensions to switch between.

xh116 commented 3 years ago

Thanks, if there is no safety problem. I will test longer to see if it improves the speed and stability comparing directly connecting to Singapore .

By the way,

How I wish one day naiveproxy could support failover with a simple txt config file. like gost:

      "ChainNodes": [
        "?peer=peer.txt"
      ]
strategy        fifo
max_fails       2
fail_timeout    10s
reload          5s
# peers
peer    http2://user:passwd@example1:443
peer    http2://user:passwd@example2:443
peer    http2://user:passwd@example3:443
peer    http2://user:passwd@example4:443
peer    http2://user:passwd@example5:443
klzgrad commented 3 years ago

"failover" is a form of load balancing. It is best not done in naiveproxy but in haproxy etc.