[GH-ISSUE #89] which one is right about RedirAddr and ServerName? #81

Open
opened 2026-02-26 12:33:55 +03:00 by kerem · 7 comments
Owner

Originally created by @qwerttvv on GitHub (Jan 14, 2020).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/89

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

Originally created by @qwerttvv on GitHub (Jan 14, 2020). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/89 **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](https://user-images.githubusercontent.com/56712217/72303769-4bf5e300-36a9-11ea-8aa9-6ae5e675fa82.png) ![image](https://user-images.githubusercontent.com/56712217/72303692-09340b00-36a9-11ea-80ac-61737c5cdfe6.png)
Author
Owner

@malikshi commented on GitHub (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

<!-- gh-comment-id:573944631 --> @malikshi commented on GitHub (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
Author
Owner

@qwerttvv commented on GitHub (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

www.bing.com 204.79.197.200????

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

image

image

<!-- gh-comment-id:573950621 --> @qwerttvv commented on GitHub (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 www.bing.com 204.79.197.200???? In china, i dont think the example is a good idea…… ![image](https://user-images.githubusercontent.com/56712217/72305023-6c27a100-36ad-11ea-9c39-fd08d39e6103.png) ![image](https://user-images.githubusercontent.com/56712217/72305058-85305200-36ad-11ea-9569-5f8c4fb3721e.png)
Author
Owner

@malikshi commented on GitHub (Jan 14, 2020):

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

<!-- gh-comment-id:574227582 --> @malikshi commented on GitHub (Jan 14, 2020): 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
Author
Owner

@Klaaktu commented on GitHub (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.

<!-- gh-comment-id:574452801 --> @Klaaktu commented on GitHub (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.
Author
Owner

@malikshi commented on GitHub (Jan 15, 2020):

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

<!-- gh-comment-id:574456651 --> @malikshi commented on GitHub (Jan 15, 2020): 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
Author
Owner

@qwerttvv commented on GitHub (Jan 15, 2020):

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

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

<!-- gh-comment-id:574513852 --> @qwerttvv commented on GitHub (Jan 15, 2020): now, i use ServerName: www.princeton.edu RedirAddr: www.princeton.edu i think princeton cant be block by gfw....its a university......
Author
Owner

@Klaaktu commented on GitHub (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. "

<!-- gh-comment-id:816274718 --> @Klaaktu commented on GitHub (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 in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#81
No description provided.