Open csalinezh opened 3 years ago
CC @toothrot who is listed as an owner of the playground.
currently available alternatives in china:
https://wide.b3log.org/playground
share: ✔
edit: ✔
run: ✔
https://goplay.space/
share: ✔
edit: ✔
run: ✔
https://goplay.tools/
share: ✔
edit: ✔
run: ✔
https://translate.google.cn/translate?u=
+playground sharing url
ex:
https://translate.google.cn/translate?u=https://play.golang.org/p/NeviD0awXjt
share: ✔
edit: ✕
run: ✕
https://ccbrown.github.io/wasm-go-playground/ js/wasm
share: ✔
edit: ✔
run: ✔
I'm in Finland and I'm getting the 451 for clicking "Share" in playground now.
Currently play.golang.org will check the origin of requests by header
X-Appengine-Country
(related code), which is set by GAE frontend, and is probably powered by GeoIP data used across Google. IfX-Appengine-Country
matches the code of China, the request will be denied and HTTP 451 Unavailable For Legal Reasons would be returned.Such restriction was first introduced in golang/playground@64f7014affabd5446cabfe7b9e362502c77caa06, citing the reason that "[t]his will permit us to serve *.golang.org to Chinese users." The related code was later revised in golang/playground@bb2a4ed2d77c5ebb58ace5e1466acec69a729a68, citing similar need.
The reason was elaborated in https://github.com/golang/go/issues/31755#issuecomment-488188461 in May 2019 by @bradfitz:
However, the current restriction does not reflect the fact that *.golang.org has already been blocked by the Great Firewall for years, which was acknowledged in the aforementioned issue and golang/playground@bb2a4ed2d77c5ebb58ace5e1466acec69a729a68. That's why a separate golang.google.cn has to be set up for users in Mainland China. The original cause for this restriction no longer exists. Playground is simply not provided in golang.google.cn.
Meanwhile, the GeoIP false-positives has caused inconvenience to multiple users, including a recent one #45378, and might pop up every time Google updates its GeoIP db.
I propose the restriction targeing CN users to be lifted, since GFW has already done its job to block unregulated user-generated content.