Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which one is right about RedirAddr and ServerName? #89

Open
qwerttvv opened this issue Jan 14, 2020 · 7 comments
Open

which one is right about RedirAddr and ServerName? #89

qwerttvv opened this issue Jan 14, 2020 · 7 comments

Comments

@qwerttvv
Copy link

qwerttvv commented Jan 14, 2020

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

@qwerttvv qwerttvv changed the title which one is right about RedirAddr or ServerName? which one is right about RedirAddr and ServerName? Jan 14, 2020
@malikshi
Copy link

malikshi commented Jan 14, 2020

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
Copy link
Author

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
Copy link

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
Copy link

Klaaktu commented Jan 15, 2020

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
Copy link

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
Copy link
Author

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

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

@Klaaktu
Copy link

Klaaktu commented Apr 8, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants