cbeuw / Cloak

A censorship circumvention tool to evade detection by authoritarian state adversaries
GNU General Public License v3.0
3.39k stars 301 forks source link

which one is right about RedirAddr and ServerName? #89

Open qwerttvv opened 4 years ago

qwerttvv commented 4 years ago

or which one is better about RedirAddr and ServerName?

A ServerName: princeton.edu RedirAddr: 140.180.223.22

B ServerName: www.princeton.edu RedirAddr: 140.180.223.42

C ServerName: www.princeton.edu RedirAddr: www.princeton.edu

D ServerName: princeton.edu RedirAddr: princeton.edu

actually, princeton.edu redirect to www.princeton.edu

so, A B C D, which one is right or better?

image

image

malikshi commented 4 years ago

redirAddr for serverside you can use IP/hostname. ServerName for clientside using hostname only see example: https://github.com/cbeuw/Cloak/tree/master/example_config

qwerttvv commented 4 years ago

redirAddr for serverside you can use IP/hostname. ServerName for clientside using hostname only see example: https://github.com/cbeuw/Cloak/tree/master/example_config

www.bing.com 204.79.197.200????

In china, i dont think the example is a good idea……

image

image

malikshi commented 4 years ago

You can use any hostname as long as work in you country, I just mention example only. Usually I'm using IP of my own isp that have collaboration with hostname like line/fb/etc for serversidw and use ServerName of fb/line in client side

Klaaktu commented 4 years ago

bing.com goes to 13.107.21.200 / 204.79.197.200, which are non-cn IPs. And then they redirect to www.bing.com, or cn.bing.com if accessed by Chinese IP. 13.107.21.200 / 204.79.197.200 & 202.89.233.100 / 202.89.233.101 seem to be MS CDNs (they all serve both versions, but access from Chinese IPs are redirected to cn.bing.com). Which IP u get depend on DNS response. For example, my ISP DNS says bing.com goes to 204.79.197.200 / 13.107.21.200(non-cn IP), then www.bing.com & cn.bing.com to 202.89.233.100 / 202.89.233.101(cn IP). However international DNS servers just give 204.79.197.200 for cn.bing.com as well. I guess MS got the IPs/domain whitelisted by GFW to avoid problems. EDIT: See the certificate for the DNS names the IP has.

malikshi commented 4 years ago

Yes. You can choose one of them that got white listed gfw. I think they didn't change that often so it's would be fine. I prefer using IPs than using hostname(I think latest update support redir on IPs and hostname) on side server

qwerttvv commented 4 years ago

now, i use ServerName: www.princeton.edu RedirAddr: www.princeton.edu

i think princeton cant be block by gfw....its a university......

Klaaktu commented 3 years ago

Fail to resolve RedirAddr causes ck-server to fail

ck-server-linux-amd64[666]: time="2021-04-08T13:02:11Z" level=fatal msg="unable to initialise server state: unable to parse RedirAddr: unable to resolve RedirAddr: lookup www.bing.com on 127.0.0.1:53: read udp 127.0.0.1:56266->127.0.0.1:53: i/o timeout. "