-
Notifications
You must be signed in to change notification settings - Fork 4
/
moe.launcher.an-anime-game-launcher.sh
44 lines (38 loc) · 1.41 KB
/
moe.launcher.an-anime-game-launcher.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# Change references to old flatpak data dir in config file to new data dir
sed -i s/moe.launcher.an-anime-game-launcher-gtk/moe.launcher.an-anime-game-launcher/ $XDG_DATA_HOME/anime-game-launcher/config.json
# Modify /etc/hosts to block logging servers
# This is possible because /etc is a writable tmpfs in flatpak
if readlink /etc/hosts > /dev/null; then
# /etc/hosts is a symlink by default, if it is, copy the original and modify it
# Otherwise, we already modified it
original=$(readlink /etc/hosts)
rm /etc/hosts
cp $original /etc/hosts
cat <<EOF >> /etc/hosts
# Global
# Genshin logging servers (do not remove!)
0.0.0.0 overseauspider.yuanshen.com
0.0.0.0 log-upload-os.hoyoverse.com
0.0.0.0 log-upload-os.mihoyo.com
0.0.0.0 sg-public-data-api.hoyoverse.com
# China
# Genshin logging servers (do not remove!)
0.0.0.0 log-upload.mihoyo.com
0.0.0.0 uspider.yuanshen.com
0.0.0.0 public-data-api.mihoyo.com
EOF
# If NO_BLOCK_PROXY is set, don't block the proxy/cdn servers
if [ -z "$NO_BLOCK_PROXY" ]; then
cat <<EOF >> /etc/hosts
# Optional Unity proxy/cdn servers
0.0.0.0 prd-lender.cdp.internal.unity3d.com
0.0.0.0 thind-prd-knob.data.ie.unity3d.com
0.0.0.0 thind-gke-usc.prd.data.corp.unity3d.com
0.0.0.0 cdp.cloud.unity3d.com
0.0.0.0 remote-config-proxy-prd.uca.cloud.unity3d.com
EOF
fi
fi
export PATH=$PATH:/usr/lib/extensions/vulkan/gamescope/bin
exec anime-game-launcher "$@"