mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 14:56:12 +00:00
Move docker files to tools
This commit is contained in:
1 parent
639bcad78d
commit
f9e017d7c4
5 files changed
No files matched your search
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
PORT=27183
|
||||
|
||||
rand_str () {
|
||||
cat /dev/urandom | tr -dc 'a-f0-9' | fold -w $1 | head -n 1
|
||||
}
|
||||
|
||||
ID="$(rand_str 8)-$(rand_str 4)-$(rand_str 4)-$(rand_str 4)-$(rand_str 12)"
|
||||
|
||||
cat <<EOF > server-cfg.json
|
||||
{
|
||||
"port": $PORT,
|
||||
"log" : {
|
||||
"access": "/v2ray/logs/access.log"
|
||||
},
|
||||
"inbound": {
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{"id": "$ID"}
|
||||
]
|
||||
}
|
||||
},
|
||||
"outbound": {
|
||||
"protocol": "freedom",
|
||||
"settings": {}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
Reference in new issue
Block a user