test
This commit is contained in:
parent
0bf9a807c5
commit
fcfeaa627a
5 changed files with 141 additions and 10 deletions
19
templates/sing-box-reality-server/Dockerfile
Normal file
19
templates/sing-box-reality-server/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM ghcr.io/sagernet/sing-box:v1.12.0-beta.14
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
RUN curl -1sLf \
|
||||
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \
|
||||
&& apk add infisical
|
||||
|
||||
RUN curl -L https://github.com/a8m/envsubst/releases/download/v1.2.0/envsubst-`uname -s`-`uname -m` -o envsubst \
|
||||
&& chmod +x envsubst \
|
||||
&& mv envsubst /usr/local/bin
|
||||
|
||||
COPY ./sing-box-reality-server.json /etc/sing-box/config.template.json
|
||||
|
||||
COPY ./start.sh /usr/local/bin/start.sh
|
||||
|
||||
ENTRYPOINT ["/usr/bin/env"]
|
||||
|
||||
CMD ["/usr/local/bin/start.sh"]
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"log": {
|
||||
"level": "info",
|
||||
"timestamp": true
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"tag": "dns:cloudflare",
|
||||
"type": "h3",
|
||||
"server": "1.1.1.1",
|
||||
"server_port": 443
|
||||
}
|
||||
]
|
||||
},
|
||||
"ntp": {
|
||||
"enabled": true,
|
||||
"server": "pool.ntp.org",
|
||||
"server_port": 123,
|
||||
"interval": "60m"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "vless",
|
||||
"tag": "in:vless",
|
||||
"listen": "::",
|
||||
"listen_port": 443,
|
||||
"users": [
|
||||
{
|
||||
"uuid": "${UUID}",
|
||||
"flow": "xtls-rprx-vision"
|
||||
}
|
||||
],
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"server_name": "${DOMAIN}",
|
||||
"reality": {
|
||||
"enabled": true,
|
||||
"handshake": {
|
||||
"server": "${DOMAIN}",
|
||||
"server_port": 443
|
||||
},
|
||||
"private_key": "${PRIVATE_KEY}",
|
||||
"short_id": [
|
||||
"${SHORT_ID}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "out:direct"
|
||||
}
|
||||
]
|
||||
}
|
3
templates/sing-box-reality-server/start.sh
Executable file
3
templates/sing-box-reality-server/start.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=$INFISICAL_MACHINE_CLIENT_ID --client-secret=$INFISICAL_MACHINE_CLIENT_SECRET --plain --silent)
|
||||
exec infisical run --token $INFISICAL_TOKEN --projectId $PROJECT_ID --env $INFISICAL_SECRET_ENV --domain $INFISICAL_API_URL --command "envsubst < /etc/sing-box/config.template.json > /etc/sing-box/config.json && sing-box run -c /etc/sing-box/config.json"
|
Loading…
Add table
Add a link
Reference in a new issue