init
This commit is contained in:
commit
0bf9a807c5
4 changed files with 168 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
singbox.json
|
||||||
|
!templates/singbox.json
|
16
docker-compose.yaml
Normal file
16
docker-compose.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
services:
|
||||||
|
sing-box:
|
||||||
|
image: ghcr.io/sagernet/sing-box:v1.12.0-alpha.9
|
||||||
|
restart: always
|
||||||
|
container_name: sing-box
|
||||||
|
ports:
|
||||||
|
- 443:443
|
||||||
|
- 127.0.0.1:10800:8080
|
||||||
|
volumes:
|
||||||
|
- ./singbox.json:/etc/sing-box/config.json:ro
|
||||||
|
command: -D /var/lib/sing-box -c /etc/sing-box/config.json run
|
||||||
|
|
||||||
|
warp:
|
||||||
|
image: ghcr.io/aleskxyz/warp-svc:v1.5.0
|
||||||
|
restart: always
|
||||||
|
container_name: warp
|
22
templates/mihomo.override.yaml
Normal file
22
templates/mihomo.override.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
+proxies:
|
||||||
|
- name: selfhost+direct
|
||||||
|
type: ss
|
||||||
|
server: 127.0.0.1
|
||||||
|
port: 443
|
||||||
|
password: "{{ op://servers/self_proxy/ss_server_password }}:{{ op://servers/self_proxy/ss_direct_user_password }}"
|
||||||
|
cipher: 2022-blake3-aes-256-gcm
|
||||||
|
udp: true
|
||||||
|
smux:
|
||||||
|
enabled: true
|
||||||
|
padding: true
|
||||||
|
|
||||||
|
- name: selfhost+warp
|
||||||
|
type: ss
|
||||||
|
server: 127.0.0.1
|
||||||
|
port: 443
|
||||||
|
password: "{{ op://servers/self_proxy/ss_server_password }}:{{ op://servers/self_proxy/ss_warp_user_password }}"
|
||||||
|
cipher: 2022-blake3-aes-256-gcm
|
||||||
|
udp: true
|
||||||
|
smux:
|
||||||
|
enabled: true
|
||||||
|
padding: true
|
128
templates/singbox.json
Normal file
128
templates/singbox.json
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"disabled": false,
|
||||||
|
"level": "debug",
|
||||||
|
"timestamp": true
|
||||||
|
},
|
||||||
|
"dns": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"type": "local",
|
||||||
|
"tag": "dns:local"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "h3",
|
||||||
|
"tag": "dns:cloudflare",
|
||||||
|
"server": "1.1.1.1",
|
||||||
|
"server_port": 443
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"auth_user": "direct",
|
||||||
|
"action": "route",
|
||||||
|
"server": "dns:cloudflare"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"auth_user": "warp",
|
||||||
|
"action": "route",
|
||||||
|
"server": "dns:cloudflare"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ntp": {
|
||||||
|
"enabled": true,
|
||||||
|
"server": "pool.ntp.org",
|
||||||
|
"server_port": 123,
|
||||||
|
"interval": "60m"
|
||||||
|
},
|
||||||
|
"endpoints": [],
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"type": "mixed",
|
||||||
|
"tag": "in:mixed",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": 8080,
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"username": "direct",
|
||||||
|
"password": "password"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "warp",
|
||||||
|
"password": "password"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"set_system_proxy": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shadowsocks",
|
||||||
|
"tag": "in:ss",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": 443,
|
||||||
|
"method": "2022-blake3-aes-256-gcm",
|
||||||
|
"password": "{{ op://servers/self_proxy/ss_server_password }}",
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"name": "direct",
|
||||||
|
"password": "{{ op://servers/self_proxy/ss_direct_user_password }}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warp",
|
||||||
|
"password": "{{ op://servers/self_proxy/ss_warp_user_password }}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": true,
|
||||||
|
"padding": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"type": "direct",
|
||||||
|
"tag": "out:direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "socks",
|
||||||
|
"tag": "out:warp",
|
||||||
|
"server": "warp",
|
||||||
|
"server_port": 1080,
|
||||||
|
"version": "5"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"route": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"inbound": [
|
||||||
|
"in:ss",
|
||||||
|
"in:mixed"
|
||||||
|
],
|
||||||
|
"auth_user": "direct",
|
||||||
|
"action": "route",
|
||||||
|
"outbound": "out:direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inbound": [
|
||||||
|
"in:ss",
|
||||||
|
"in:mixed"
|
||||||
|
],
|
||||||
|
"auth_user": "warp",
|
||||||
|
"action": "route",
|
||||||
|
"outbound": "out:warp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip_is_private": true,
|
||||||
|
"outbound": [
|
||||||
|
"out:direct",
|
||||||
|
"out:warp"
|
||||||
|
],
|
||||||
|
"action": "reject"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_domain_resolver": {
|
||||||
|
"server": "dns:local"
|
||||||
|
},
|
||||||
|
"final": "out:direct"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue