diff --git a/res/neko.qrc b/res/neko.qrc index a1b0280..267e9d6 100644 --- a/res/neko.qrc +++ b/res/neko.qrc @@ -17,8 +17,6 @@ public/nekobox.png - vpn/vpn-run-root.sh - vpn/sing-box-vpn.json dashboard-notice.html diff --git a/res/public/qtbase_zh_CN.qm b/res/public/qtbase_zh_CN.qm deleted file mode 100644 index 8f4354d..0000000 Binary files a/res/public/qtbase_zh_CN.qm and /dev/null differ diff --git a/res/vpn/sing-box-vpn.json b/res/vpn/sing-box-vpn.json deleted file mode 100644 index adb32e3..0000000 --- a/res/vpn/sing-box-vpn.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "log": { - "level": "info" - }, - "dns": { - "fakeip": { - "enabled": true, - "inet4_range": "198.18.0.0/15", - "inet6_range": "fc00::/18" - }, - "servers": [ - { - "tag": "dns-remote", - "address": "8.8.8.8", - "detour": "nekoray-socks" - }, - { - "tag": "dns-direct", - "address": "%DNS_ADDRESS%", - "detour": "direct" - }, - { - "address": "fakeip", - "tag": "dns-fake" - }, - { - "address": "rcode://success", - "tag": "dns-block" - } - ], - "rules": [ - { - "query_type": [ - 32, - 33 - ], - "server": "dns-block" - }, - { - "domain_suffix": [ - ".lan" - ], - "server": "dns-block" - }, - { - "process_name": [ - "nekoray_core", - "nekoray_core.exe", - "nekobox_core", - "nekobox_core.exe" - ], - "server": "dns-direct" - }, - { - "inbound": "%FAKE_DNS_INBOUND%", - "server": "dns-fake" - } - ] - }, - "inbounds": [ - { - "type": "tun", - "tag": "tun-in", - "interface_name": "%TUN_NAME%", - "inet4_address": "172.19.0.1/28", - //%IPV6_ADDRESS% - "mtu": %MTU%, - "auto_route": true, - "strict_route": %STRICT_ROUTE%, - "stack": "%STACK%", - "endpoint_independent_nat": true, - "sniff": false - } - ], - "outbounds": [ - { - "type": "socks", - "tag": "nekoray-socks", - "udp_fragment": true, - //%SOCKS_USER_PASS% - "server": "127.0.0.1", - "server_port": %PORT% - }, - { - "type": "block", - "tag": "block" - }, - { - "type": "direct", - "tag": "direct" - }, - { - "type": "dns", - "tag": "dns-out" - } - ], - "route": { - "final": "%FINAL_OUT%", - "auto_detect_interface": true, - "rules": [ - { - "network": "udp", - "port": [ - 135, - 137, - 138, - 139, - 5353 - ], - "outbound": "block" - }, - { - "ip_cidr": [ - "224.0.0.0/3", - "ff00::/8" - ], - "outbound": "block" - }, - { - "source_ip_cidr": [ - "224.0.0.0/3", - "ff00::/8" - ], - "outbound": "block" - }, - { - "port": 53, - "process_name": [ - "nekoray_core", - "nekoray_core.exe" - ], - "outbound": "dns-out" - }, - { - "process_name": [ - "nekoray_core", - "nekoray_core.exe", - "nekobox_core", - "nekobox_core.exe" - ], - "outbound": "direct" - } - //%PROCESS_NAME_RULE% - //%CIDR_RULE% - , - { - "port": 53, - "outbound": "dns-out" - } - ] - } -} \ No newline at end of file diff --git a/res/vpn/vpn-run-root.sh b/res/vpn/vpn-run-root.sh deleted file mode 100755 index 7608f6f..0000000 --- a/res/vpn/vpn-run-root.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -set -e -set -x - -if [ "$EUID" -ne 0 ]; then - echo "[Warning] Tun script not running as root" -fi - -if [ "$(uname)" == "Darwin" ]; then - IS_MACOS=1 -fi - -[ -z $TABLE_FWMARK ] && echo "Please set env TABLE_FWMARK" && exit -command -v pkill >/dev/null 2>&1 || echo "[Warning] pkill not found" - -BASEDIR=$(dirname "$0") -cd $BASEDIR - -pre_start_linux() { - # set bypass: fwmark - ip rule add pref 8999 fwmark $TABLE_FWMARK table main || return - ip -6 rule add pref 8999 fwmark $TABLE_FWMARK table main || return - - # for Tun2Socket - iptables -I INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT - ip6tables -I INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT -} - -start() { - [ -z $IS_MACOS ] && pre_start_linux - "./nekobox_core" run -c "$CONFIG_PATH" --protect-listen-path "$PROTECT_LISTEN_PATH" --protect-fwmark $TABLE_FWMARK -} - -stop() { - [ -z $IS_MACOS ] || return - for local in $BYPASS_IPS; do - ip rule del to $local table main - done - iptables -D INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT - ip6tables -D INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT - ip rule del fwmark $TABLE_FWMARK - ip -6 rule del fwmark $TABLE_FWMARK -} - -if [ "$1" != "stop" ]; then - start || true -fi - -stop || true diff --git a/src/main.cpp b/src/main.cpp index 0a595e1..108d262 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,9 +49,6 @@ void loadTranslate(const QString& locale) { if (trans->load(":/translations/" + locale + ".qm")) { QCoreApplication::installTranslator(trans); } - if (trans_qt->load(QApplication::applicationDirPath() + "/qtbase_" + locale + ".qm")) { - QCoreApplication::installTranslator(trans_qt); - } } #define LOCAL_SERVER_PREFIX "nekoray-"