mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-13 00:41:20 +00:00
~添加ss和vmess入站支持
This commit is contained in:
38
scripts/libs/sb_inbounds.sh
Normal file
38
scripts/libs/sb_inbounds.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
[ "$vms_service" = ON ] && {
|
||||
[ -n "$vms_ws_path" ] && transport=', "transport": { "type": "ws", "path": '"$vms_ws_path"' }'
|
||||
cat >"$TMPDIR"/jsons/vmess-in.json <<EOF
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "vmess",
|
||||
"tag": "vmess-in",
|
||||
"listen": "::",
|
||||
"listen_port": $vms_port,
|
||||
"users": [
|
||||
{
|
||||
"uuid": "$vms_uuid"
|
||||
}
|
||||
]$transport
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
[ "$sss_service" = ON ] && {
|
||||
cat >"$TMPDIR"/jsons/ss-in.json <<EOF
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "shadowsocks",
|
||||
"tag": "ss-in",
|
||||
"method": "$sss_cipher",
|
||||
"password": "$sss_pwd",
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
}
|
||||
Reference in New Issue
Block a user