hearthstone-linux icon indicating copy to clipboard operation
hearthstone-linux copied to clipboard

A solution for Chinese users

Open AnticPan opened this issue 1 year ago • 10 comments

The project cannot run directly for the CN server. I made some modifications, and somehow it works.

  1. Modify login/login.c and replace https://battle.net/login/?app=wtcg with https://account.battlenet.com.cn/login/?app=wtcg.
  2. Run ./craft.sh with kr region first. After all downloads are finished, modify hearthstone/client.config and replace the line Aurora.Env=cn.actual.battlenet.com.cn. When download Unity in the craft.sh, a proxy may be necessary.

项目无法直接在国服运行。我做了一些修改,现在可以运行了。

  1. 修改 login/login.c,将 https://battle.net/login/?app=wtcg 替换为 https://account.battlenet.com.cn/login/?app=wtcg
  2. 首先使用 kr 区域运行 ./craft.sh。下载完成后,修改 hearthstone/client.config,将其中的 Aurora.Env=cn.actual.battlenet.com.cn 替换掉。在 craft.sh 中下载 Unity 时,可能需要使用代理。

AnticPan avatar Oct 14 '24 16:10 AnticPan

Tried it but not work for me so far. failed to fetch unity archive.I downloaded the .tar.xz and how to get it work .should I exact the .xz and copy that to some path?

zfro avatar Oct 25 '24 14:10 zfro

There is no .login file in the downloaded files, resulting in the inability to log in.

chinaywx avatar Oct 27 '24 14:10 chinaywx

我也提了一个pr https://github.com/0xf4b1/hearthstone-linux/pull/72

DawnMagnet avatar Oct 29 '24 14:10 DawnMagnet

我的pr修改后可以正常使用cn区域下载

DawnMagnet avatar Oct 29 '24 14:10 DawnMagnet

Tried it but not work for me so far. failed to fetch unity archive.I downloaded the .tar.xz and how to get it work .should I exact the .xz and copy that to some path?

If you have proxy running in local, you can try to install proxychains package. After configure the proxychains config, run proxychains4 ./craft.sh.

AnticPan avatar Nov 05 '24 12:11 AnticPan

There is no .login file in the downloaded files, resulting in the inability to log in.

You can cd into the hearthstone-linux/login folder and try to compile the login.c. Some packages may be missing and needs to be installed. I compiled the executable login with g++ login.c `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0` -lcryptopp -o login. Finally, move the login to ../hearthstone.

ChatGPT can help when compile the login file.

AnticPan avatar Nov 05 '24 12:11 AnticPan

PR #94 redirect download cdn to Netease Leihuo. By selecting region cn, you could download game files without proxychains. PR #94 修正了下载cdn选项,国服玩家可以直接选择cn地域以完成游戏下载与更新。但是登录还是存在问题,需要进一步检查

michaelGuo1204 avatar Jun 17 '25 15:06 michaelGuo1204

PR #94 redirect download cdn to Netease Leihuo. By selecting region cn, you could download game files without proxychains.PR #94 将下载 cdn 重定向至网易雷火。选择地区 cn,即可无需代理链下载游戏文件。 PR #94 修正了下载cdn选项,国服玩家可以直接选择cn地域以完成游戏下载与更新。但是登录还是存在问题,需要进一步检查

After your PR, there are still two steps:

  1. change the url in login.c to cn version "https://account.battlenet.com.cn/login/?app=wtcg"
  2. change the aurora in client.config to Aurora.Env=cn.actual.battlenet.com.cn

DawnMagnet avatar Jun 24 '25 09:06 DawnMagnet

提醒国服玩家注意,由于Unity官方基于GeoIP对所有 https://download.unity3d.com/ 的访问进行了重定向,现有脚本无法安装对应Unity包。如果在安装过程中在Unity更新阶段遇到如下错误,请大家使用用户侧代理。 Attentions for players in mainland china, due to unexpected redirections of unity china the craft.sh script would not be able to download the correct version of Unity packages. Please use user-sider proxys during installation.

Downloading Unity from ***.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Extracting Unity ...
tar: This does not look like a tar archive
xz: (stdin): File format not recognized

参照/References Redirection Issues

michaelGuo1204 avatar Sep 22 '25 11:09 michaelGuo1204

提醒国服玩家注意,由于Unity官方基于GeoIP对所有 https://download.unity3d.com/ 的访问进行了重定向,现有脚本无法安装对应Unity包。如果在安装过程中在Unity更新阶段遇到如下错误,请大家使用用户侧代理。 Attentions for players in mainland china, due to unexpected redirections of unity china the craft.sh script would not be able to download the correct version of Unity packages. Please use user-sider proxys during installation.

Downloading Unity from ***. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 Extracting Unity ... tar: This does not look like a tar archive xz: (stdin): File format not recognized 参照/References Redirection Issues

你好 @michaelGuo1204 ,我看到你链接了这个 issues。关于UnityCN官方是否采用GeoIP判断ip属地只是我的推断,尚未经过官方证实。目前因为官方的阻断无法获取全部6000版本及其他国际版,也就是说除了6000版本其他的都有相对应国内版本。


Hello @michaelGuo1204, I noticed you linked to this issue. Regarding whether UnityCN officially uses GeoIP to determine IP location, that's merely my speculation and hasn't been confirmed by the official team. Currently, due to the official block, we can't access all 6000 versions or other international editions. This means that aside from the 6000 versions, all others have corresponding domestic versions.

CreationWong avatar Oct 10 '25 11:10 CreationWong