forked from eooce/Sing-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
19 lines (17 loc) · 17.5 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
export UUID=${UUID:-'bc97f674-c578-4940-9234-0a1da46041b9'} # 节点UUID
export NEZHA_SERVER=${NEZHA_SERVER:-'nz.abc.cn'} # 哪吒客户端域名或ip,哪吒3个变量不全不运行
export NEZHA_PORT=${NEZHA_PORT:-'5555'} # 哪吒端口为{443,8443,2053,2083,2087,2096}其中之一时自动开启tls
export NEZHA_KEY=${NEZHA_KEY:-''} # 哪吒客户端密钥
export ARGO_DOMAIN=${ARGO_DOMAIN:-''} # 固定隧道域名,留空即启用临时隧道
export ARGO_AUTH=${ARGO_AUTH:-''} # 固定隧道token或json
export CFIP=${CFIP:-'www.visa.com.tw'} # argo节点优选域名
export CFPORT=${CFPORT:-'8443'} # argo节点端口
export NAME=${NAME:-'AAA'} # 节点名称
export FILE_PATH=${FILE_PATH:-'./.npm'} # sub节点路径
export ARGO_PORT=${ARGO_PORT:-'8001'} # argo端口 使用固定隧道token需和cf后台设置对应
export HY2_PORT=${HY2_PORT:-'50000'} # Hy2 端口,支持多端口玩具可填写,否则不动
export REALITY_PORT=${REALITY_PORT:-'60000'} # reality 端口,支持多端口玩具可填写,否则不动
export SERVER_PORT="${SERVER_PORT:-${PORT:-7860}}" # Tuic 端口,自动获取玩具端口,不用改
echo "WyAhIC1kICIke0ZJTEVfUEFUSH0iIF0gJiYgbWtkaXIgLXAgIiR7RklMRV9QQVRIfSIgJiYgcm0gLXJmIGJvb3QubG9nIGNvbmZpZy5qc29uIHR1bm5lbC5qc29uIHR1bm5lbC55bWwgIiR7RklMRV9QQVRIfS9zdWIudHh0IgoKYXJnb19jb25maWd1cmUoKSB7CiAgaWYgW1sgLXogJEFSR09fQVVUSCB8fCAteiAkQVJHT19ET01BSU4gXV07IHRoZW4KICAgIGVjaG8gLWUgIlxlWzE7MzJt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XRwdXR9IiB8IGF3ayAnL1ByaXZhdGVLZXk6LyB7cHJpbnQgJDJ9JykKcHVibGljX2tleT0kKGVjaG8gIiR7b3V0cHV0fSIgfCBhd2sgJy9QdWJsaWNLZXk6LyB7cHJpbnQgJDJ9JykKCm9wZW5zc2wgZWNwYXJhbSAtZ2Vua2V5IC1uYW1lIHByaW1lMjU2djEgLW91dCAicHJpdmF0ZS5rZXkiCm9wZW5zc2wgcmVxIC1uZXcgLXg1MDkgLWRheXMgMzY1MCAta2V5ICJwcml2YXRlLmtleSIgLW91dCAiY2VydC5wZW0iIC1zdWJqICIvQ049YmluZy5jb20iCgogIGNhdCA+IGNvbmZpZy5qc29uIDw8IEVPRgp7CiAgICAibG9nIjogewogICAgICAgICJkaXNhYmxlZCI6IGZhbHNlLAogICAgICAgICJsZXZlbCI6ICJpbmZvIiwKICAgICAgICAidGltZXN0YW1wIjogdHJ1ZQogICAgfSwKICAgICJkbnMiOiB7CiAgICAgICAgInNlcnZlcnMiOiBbCiAgICAgICAgewogICAgICAgICAgICAidGFnIjogImdvb2dsZSIsCiAgICAgICAgICAgICJhZGRyZXNzIjogInRsczovLzguOC44LjgiCiAgICAgICAgfQogICAgICAgIF0KICAgIH0sCiAgICAiaW5ib3VuZHMiOiBbCiAgICB7CiAgICAgICJ0YWciOiAidm1lc3Mtd3MtaW4iLAogICAgICAidHlwZSI6ICJ2bWVzcyIsCiAgICAgICJsaXN0ZW4iOiAiOjoiLAogICAgICAibGlzdGVuX3BvcnQiOiAke0FSR09fUE9SVH0sCiAgICAgICAgInVzZXJzIjogWwogICAgICAgIHsKICAgICAgICAgICJ1dWlkIjogIiR7VVVJRH0iCiAgICAgICAgfQogICAgICBdLAogICAgICAidHJhbnNwb3J0IjogewogICAgICAgICJ0eXBlIjogIndzIiwKICAgICAgICAicGF0aCI6ICIvdm1lc3MiLAogICAgICAgICJlYXJseV9kYXRhX2hlYWRlcl9uYW1lIjogIlNlYy1XZWJTb2NrZXQtUHJvdG9jb2wiCiAgICAgIH0KICAgIH0sCgogICAgewogICAgICAidGFnIjogInR1aWMtaW4iLAogICAgICAidHlwZSI6ICJ0dWljIiwKICAgICAgImxpc3RlbiI6ICI6OiIsCiAgICAgICJsaXN0ZW5fcG9ydCI6ICR7U0VSVkVSX1BPUlR9LAogICAgICAidXNlcnMiOiBbCiAgICAgICAgewogICAgICAgICAgInV1aWQiOiAiJHtVVUlEfSIsCiAgICAgICAgICAicGFzc3dvcmQiOiAiYWRtaW4iCiAgICAgICAgfQogICAgICBdLAogICAgICAiY29uZ2VzdGlvbl9jb250cm9sIjogImJiciIsCiAgICAgICJ0bHMiOiB7CiAgICAgICAgImVuYWJsZWQiOiB0cnVlLAogICAgICAgICJhbHBuIjogWwogICAgICAgICAgImgzIgogICAgICAgIF0sCiAgICAgICAgImNlcnRpZmljYXRlX3BhdGgiOiAiY2VydC5wZW0iLAogICAgICAgICJrZXlfcGF0aCI6ICJwcml2YXRlLmtleSIKICAgICAgfQogICAgfSwKCiAgICB7CiAgICAgICJ0YWciOiAiaHlzdGVyaWEyLWluIiwKICAgICAgInR5cGUiOiAiaHlzdGVyaWEyIiwKICAgICAgImxpc3RlbiI6ICI6OiIsCiAgICAgICJsaXN0ZW5fcG9ydCI6ICR7SFkyX1BPUlR9LAogICAgICAgICJ1c2VycyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgICJwYXNzd29yZCI6ICIke1VVSUR9IgogICAgICAgICAgfQogICAgICBdLAogICAgICAibWFzcXVlcmFkZSI6ICJodHRwczovL2JpbmcuY29tIiwKICAgICAgICAidGxzIjogewogICAgICAgICAgICAiZW5hYmxlZCI6IHRydWUsCiAgICAgICAgICAgICJhbHBuIjogWwogICAgICAgICAgICAgICAgImgzIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiY2VydGlmaWNhdGVfcGF0aCI6ICJjZXJ0LnBlbSIsCiAgICAgICAgICAgICJrZXlfcGF0aCI6ICJwcml2YXRlLmtleSIKICAgICAgICAgIH0KICAgICAgfSwKCiAgICAgIHsKICAgICAgICAidGFnIjogInZsZXNzLXJlYWxpdHktdmVzaW9uIiwKICAgICAgICAidHlwZSI6ICJ2bGVzcyIsCiAgICAgICAgImxpc3RlbiI6ICI6OiIsCiAgICAgICAgImxpc3Rlbl9wb3J0IjogJFJFQUxJVFlfUE9SVCwKICAgICAgICAgICJ1c2VycyI6IFsKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAidXVpZCI6ICIkVVVJRCIsCiAgICAgICAgICAgICAgICAiZmxvdyI6ICJ4dGxzLXJwcngtdmlzaW9uIgogICAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAidGxzIjogewogICAgICAgICAgICAgICJlbmFibGVkIjogdHJ1ZSwKICAgICAgICAgICAgICAic2VydmVyX25hbWUiOiAiY291cG9uLXRyaXAuY29tIiwKICAgICAgICAgICAgICAicmVhbGl0eSI6IHsKICAgICAgICAgICAgICAgICAgImVuYWJsZWQiOiB0cnVlLAogICAgICAgICAgICAgICAgICAiaGFuZHNoYWtlIjogewogICAgICAgICAgICAgICAgICAgICAgInNlcnZlciI6ICJjb3Vwb24tdHJpcC5jb20iLAogICAgICAgICAgICAgICAgICAgICAgInNlcnZlcl9wb3J0IjogNDQzCiAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICJwcml2YXRlX2tleSI6ICIkcHJpdmF0ZV9rZXkiLAogICAgICAgICAgICAgICAgICAic2hvcnRfaWQiOiBbCiAgICAgICAgICAgICAgICAgICAgIiIKICAgICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgfQogICBdLAogICAgIm91dGJvdW5kcyI6IFsKICAgIHsKICAgICAgInR5cGUiOiAiZGlyZWN0IiwKICAgICAgInRhZyI6ICJkaXJlY3QiCiAgICB9LAogICAgewogICAgICAidHlwZSI6ICJkaXJlY3QiLAogICAgICAidGFnIjogImRpcmVjdC1pcHY0LXByZWZlci1vdXQiLAogICAgICAi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AgewogICAgICAidHlwZSI6ICJkaXJlY3QiLAogICAgICAidGFnIjogIndpcmVndWFyZC1pcHY0LXByZWZlci1vdXQiLAogICAgICAiZGV0b3VyIjogIndpcmVndWFyZC1vdXQiLAogICAgICAiZG9tYWluX3N0cmF0ZWd5IjogInByZWZlcl9pcHY0IgogICAgfSwKICAgIHsKICAgICAgInR5cGUiOiAiZGlyZWN0IiwKICAgICAgInRhZyI6ICJ3aXJlZ3VhcmQtaXB2NC1vbmx5LW91dCIsCiAgICAgICJkZXRvdXIiOiAid2lyZWd1YXJkLW91dCIsCiAgICAgICJkb21haW5fc3RyYXRlZ3kiOiAiaXB2NF9vbmx5IgogICAgfSwKICAgIHsKICAgICAgInR5cGUiOiAiZGlyZWN0IiwKICAgICAgInRhZyI6ICJ3aXJlZ3VhcmQtaXB2Ni1wcmVmZXItb3V0IiwKICAgICAgImRldG91ciI6ICJ3aXJlZ3VhcmQtb3V0IiwKICAgICAgImRvbWFpbl9zdHJhdGVneSI6ICJwcmVmZXJfaXB2NiIKICAgIH0sCiAgICB7CiAgICAgICJ0eXBlIjogImRpcmVjdCIsCiAgICAgICJ0YWciOiAid2lyZWd1YXJkLWlwdjYtb25seS1vdXQiLAogICAgICAiZGV0b3VyIjogIndpcmVndWFyZC1vdXQiLAogICAgICAiZG9tYWluX3N0cmF0ZWd5IjogImlwdjZfb25seSIKICAgIH0KICBdLAogICJyb3V0ZSI6IHsKICAgICJydWxlX3NldCI6IFsKICAgICAgewogICAgICAgICJ0YWciOiAiZ2Vvc2l0ZS1uZXRmbGl4IiwKICAgICAgICAidHlwZSI6ICJyZW1vdGUiLAogICAgICAgICJmb3JtYXQiOiAiYmluYXJ5IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9TYWdlck5ldC9zaW5nLWdlb3NpdGUvcnVsZS1zZXQvZ2Vvc2l0ZS1uZXRmbGl4LnNycyIsCiAgICAgICAgInVwZGF0ZV9pbnRlcnZhbCI6ICIxZCIKICAgICAgfSwKICAgICAgewogICAgICAgICJ0YWciOiAiZ2Vvc2l0ZS1vcGVuYWkiLAogICAgICAgICJ0eXBlIjogInJlbW90ZSIsCiAgICAgICAgImZvcm1hdCI6ICJiaW5hcnkiLAogICAgICAgICJ1cmwiOiAiaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL01ldGFDdWJlWC9tZXRhLXJ1bGVzLWRhdC9zaW5nL2dlby9nZW9zaXRlL29wZW5haS5zcnMiLAogICAgICAgICJ1cGRhdGVfaW50ZXJ2YWwiOiAiMWQiCiAgICAgIH0KICAgIF0sCiAgICAicnVsZXMiOiBbCiAgICAgIHsKICAgICAgICAicnVsZV9zZXQiOiBbCiAgICAgICAgICAiZ2Vvc2l0ZS1uZXRmbGl4IgogICAgICAgIF0sCiAgICAgICAgIm91dGJvdW5kIjogIndpcmVndWFyZC1pcHY2LW9ubHktb3V0IgogICAgICB9LAogICAgICB7CiAgICAgICAgImRvbWFpbiI6IFsKICAgICAgICAgICJhcGkuc3RhdHNpZy5jb20iLAogICAgICAgICAgImJyb3dzZXItaW50YWtlLWRhdGFkb2docS5jb20iLAogICAgICAgICAgImNkbi5vcGVuYWkuY29tIiwKICAgICAgICAgICJjaGF0Lm9wZW5haS5jb20iLAogICAgICAgICAgImF1dGgub3BlbmFpLmNvbSIsCiAgICAgICAgICAiY2hhdC5vcGVuYWkuY29tLmNkbi5jbG91ZGZsYXJlLm5ldCIsCiAgICAgICAgICAiaW9zLmNoYXQub3BlbmFpLmNvbSIsCiAgICAgICAgICAibzMzMjQ5LmluZ2VzdC5zZW50cnkuaW8iLAogICAgICAgICAgIm9wZW5haS1hcGkuYXJrb3NlbGFicy5jb20iLAogICAgICAgICAgIm9wZW5haWNvbS1hcGktYmRjcGY4YzZkMmU5YXRmNi56MDEuYXp1cmVmZC5uZXQiLAogICAgICAgICAgIm9wZW5haWNvbXByb2R1Y3Rpb25hZTRiLmJsb2IuY29yZS53aW5kb3dzLm5ldCIsCiAgICAgICAgICAicHJvZHVjdGlvbi1vcGVuYWljb20tc3RvcmFnZS5henVyZWVkZ2UubmV0IiwKICAgICAgICAgICJzdGF0aWMuY2xvdWRmbGFyZWluc2lnaHRzLmNvbSIKICAgICAgICBdLAogICAgICAgICJkb21haW5fc3VmZml4IjogWwogICAgICAgICAgIi5hbGdvbGlhLm5ldCIsCiAgICAgICAgICAiLmF1dGgwLmNvbSIsCiAgICAgICAgICAiLmNoYXRncHQuY29tIiwKICAgICAgICAgICIuY2hhbGxlbmdlcy5jbG91ZGZsYXJlLmNvbSIsCiAgICAgICAgICAiLmNsaWVudC1hcGkuYXJrb3NlbGFicy5jb20iLAogICAgICAgICAgIi5ldmVudHMuc3RhdHNpZ2FwaS5uZXQiLAogICAgICAgICAgIi5mZWF0dXJlZ2F0ZXMub3JnIiwKICAgICAgICAgICIuaWRlbnRydXN0LmNvbSIsCiAgICAgICAgICAiLmludGVyY29tLmlvIiwKICAgICAgICAgICIuaW50ZXJjb21jZG4uY29tIiwKICAgICAgICAgICIubGF1bmNoZGFya2x5LmNvbSIsCiAgICAgICAgICAiLm9haXN0YXRpYy5jb20iLAogICAgICAgICAgIi5vYWl1c2VyY29udGVudC5jb20iLAogICAgICAgICAgIi5vYnNlcnZlaXQubmV0IiwKICAgICAgICAgICIub3BlbmFpLmNvbSIsCiAgICAgICAgICAiLm9wZW5haWFwaS1zaXRlLmF6dXJlZWRnZS5uZXQiLAogICAgICAgICAgIi5vcGVuYWljb20uaW1naXgubmV0IiwKICAgICAgICAgICIuc2VnbWVudC5pbyIsCiAgICAgICAgICAiLnNlbnRyeS5pbyIsCiAgICAgICAgICAiLnN0cmlwZS5jb20iCiAgICAgICAgXSwKICAgICAgICAiZG9tYWluX2tleXdvcmQiOiBbCiAgICAgICAgICAib3BlbmFpY29tLWFwaSIKICAgICAgICBdLAogICAgICAgICJvdXRib3VuZCI6ICJ3aXJlZ3VhcmQtaXB2Ni1wcmVmZXItb3V0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