diff options
author | Kirikaze Chiyuki | 2024-05-31 21:43:34 +0800 |
---|---|---|
committer | Kirikaze Chiyuki | 2024-05-31 21:43:34 +0800 |
commit | 4083c08e3593286a69682db5f73534e96ba051a2 (patch) | |
tree | 628b36eabcef61cc5c15cb688a40500ae4e3d3f0 /start_inner.sh | |
parent | 06d881457388c36baed8d047dd298bcc283a701f (diff) | |
download | aur-4083c08e3593286a69682db5f73534e96ba051a2.tar.gz |
[feat] 自动切换 / 手动启用 MAC 地址固定模式
Diffstat (limited to 'start_inner.sh')
-rwxr-xr-x | start_inner.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/start_inner.sh b/start_inner.sh new file mode 100755 index 000000000000..d40a92e138cb --- /dev/null +++ b/start_inner.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Source: https://alampy.com/2024/05/15/fix-mac-for-linux-qq/ + +trap 'kill $(jobs -p)' EXIT + +echo $$ > "${INFO_FILE}" +echo "PID written." + +# wait for the file to be deleted +while [ -f "${INFO_FILE}" ]; do + sleep 0.01 +done +# clear proxy settings +unset http_proxy +unset https_proxy +unset ftp_proxy +unset all_proxy +socat tcp-listen:94301,reuseaddr,fork tcp:127.0.0.1:4301 & +socat tcp-listen:94310,reuseaddr,fork tcp:127.0.0.1:4310 & +/opt/QQ/electron --no-proxy-server "$@" + +# 移除无用崩溃报告和日志 +# 如果需要向腾讯反馈 bug,请注释掉如下几行 +rm -rf ${QQ_APP_DIR}/crash_files +touch ${QQ_APP_DIR}/crash_files +if [ -d "${QQ_APP_DIR}/log" ]; then + rm -rf "${QQ_APP_DIR}/log" +fi +for nt_qq_userdata in "${QQ_APP_DIR}/nt_qq_"*; do + if [ -d "${nt_qq_userdata}/log" ]; then + rm -rf "${nt_qq_userdata}/log" + fi + if [ -d "${nt_qq_userdata}/log-cache" ]; then + rm -rf "${nt_qq_userdata}/log-cache" + fi +done +if [ -d "${QQ_APP_DIR}/Crashpad" ]; then + rm -rf "${QQ_APP_DIR}/Crashpad" +fi + +exit $? |