Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cloud): add common vpn services #383

Merged
merged 6 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/lab/ipsec/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
dockovpn:
image: docker.io/hwdsl2/ipsec-vpn-server:latest

cap_add:
- NET_ADMIN

ports:
- "500:500/udp"
- "4500:4500/udp"

privileged: true

cpu_shares: 512
mem_limit: 256m

restart: unless-stopped

env_file: .env

volumes:
- type: bind
source: ./_data
target: /etc/ipsec.d
bind:
create_host_path: true

2 changes: 2 additions & 0 deletions packages/lab/ipsec/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX1/BdD2IGzSSYVHQPlu9P/61OUSq2TTgQWo3RnkqMfIM8ElTo9edqI3X
woRBZsb7JzjXWD69V2EeIXu3TRqV5f7lCx40q8HmRcg=
33 changes: 33 additions & 0 deletions packages/lab/ipsec/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
U2FsdGVkX189paSEDMwnZEflnKuL7bWI62aAv9qPTStUO34oHVcoGLnnRFP6M71b
tOq3E9NLHKqynbPexiXPYVABMXiPKci/uJOt3p3Y07lEDF+fXxNRxflmBHd+B6N5
NaJTsuKgL4IxBrdlOphP0+dBDm4seb4P/mtgRi4N2Fk0Ltws4X6osSxIkhWnFZnD
ebNU0MB+B/1CRMb5YB5CMpHHkFqX+fuj73mrPCVid+6tAlqJ+HCh4Hlp5ZItU3ao
XrLCSHfXsV44YCwLlMEHaMTnNvGMgWqQDsWfMsOJFKGLFHC9Mw/QB8jwnFX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Y8mMyHlnAiyS+OR0aPFjMdQ8m
ns4uCAwE4wGcnnYh3mPu5EUjxx6GleGDBFItB9aNxYFEgP5ziIxHGmANOvDODIOK
dvi1e9OO0lRzwKxBI/AOoiWQRLufVtWJLRzRRdivnBxnkC0JWFcz6RdbjdEVJ/Rs
rcQugVjvx0QR3EemK402uSQIRC9PaQVaxakd6+Cjp+V9y920UWXw+FhHLKmh2cuD
fkK68tM6N6yexKdropFftuxYBGt/LeNzDgQAMWgJbaKh3semXfZoYIpgz2H6E9fJ
tQpFr2UAuD7SEktL70GbvOqJITXXGiySXJW5U4yfeejEe54SOvqQ988TkoI5iA5m
i9LrG5/+ZT9jlL9nfgeG/RdO6k8ms9PdEU4rsGc0e3LKaoEtlr9irUxQKFphN7Se
Aj5iTOB5TV9dgj/UiWIWS+DH8GwyO8lwi0nIxfwx2qo82PC1M2OuRFSUAmLfUAYK
R/a7HyB7nk5TaE0x0wrEFfik1pengZ2VmxXEUZ8kmgFs9wm4hTFiUB8p+DzYs9u2
AKSPMScFi+xiozJwgUg+D4OlNhHx9YxVsHocAf/Kd6U4eL4ascUc1c/FGBdSKGX1
fXMtolsi/mS1R/+q+lUqcjjlfLAeiN6QzdzC6GOPgrp0xYLvXkF6Q4jyhDrmAMZA
/oPLaGmaUhr5+xbiIsATOQ==
25 changes: 25 additions & 0 deletions packages/lab/openvpn/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
dockovpn:
image: docker.io/alekslitvinenk/openvpn:latest

cap_add:
- NET_ADMIN

ports:
- 1194:1194/udp
- 8080:8080

cpu_shares: 512
mem_limit: 256m

restart: unless-stopped

env_file: .env

# volumes:
# - type: bind
# source: ./_data
# target: /opt/Dockovpn_data
# bind:
# create_host_path: true

2 changes: 2 additions & 0 deletions packages/lab/openvpn/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX1+IRIYMANDiJUIj/2f4lgC9Lhlv8lj8Bg5wpSQtbVel86CtHWBK16Ip
jQBPU7BM6y2y7BpPB/oLVd/swypOsnMTd6T5FKo2V5U=
3 changes: 3 additions & 0 deletions packages/lab/openvpn/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
U2FsdGVkX19HxiaW42GCIKCZQiYvcHMBLdsHCup5AINsfdPfGWNFuofW/dyVDynZ
YQ2Sce8bC9mOU2adZHt0WCnJXMO7hPuAxI1TYlsaqAaqk7s4721IPgRSM2qRepe+
9R7RS0fZCBCkbmjXlMfYog==
13 changes: 13 additions & 0 deletions packages/lab/shadowsocks/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
dockovpn:
image: docker.io/dockage/shadowsocks-server:latest

ports:
- 53:8388

cpu_shares: 512
mem_limit: 256m

restart: unless-stopped

env_file: .env
2 changes: 2 additions & 0 deletions packages/lab/shadowsocks/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX18Ox0po4TP5A40dyn5SX7RC3oDQ91Z9mKwn+HL6nux9sb/J746RKk3C
fOdZqG49FJgClAeLjBnjkAHteUsRFvk88BUBnPtgi4I=
3 changes: 3 additions & 0 deletions packages/lab/shadowsocks/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
U2FsdGVkX18yGPwWFs//7qpAy2UNVwjkVVFtV5R+Wd2rn2L1w8iE5AfjrZ77//8V
ImVyYy+IcqasyohSeW3LKLmC0jikGVxvV66vXpxjz6wSzkF8JpjQfyz8a7YaMM+x
HKtBUF8njMCq6VwQK23o+g==
26 changes: 26 additions & 0 deletions packages/lab/v2fly/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
dockovpn:
image: docker.io/v2fly/v2fly-core:latest

ports:
- ${PORT}:${PORT}
- ${PORT}:${PORT}/udp

cpu_shares: 512
mem_limit: 256m

restart: unless-stopped

command:
- run
- -format=jsonv5
- -c
- /etc/config/${CONFIG}.json

env_file: .env

volumes:
- type: bind
source: ./config
target: /etc/config
read_only: true
42 changes: 42 additions & 0 deletions packages/lab/v2fly/config/client-vmess-socks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"log": {
"access": {
"type": "Console",
"level": "Debug"
},
"error": {
"type": "Console",
"level": "Debug"
}
},
"inbounds": [
{
"protocol": "socks",
"listen": "0.0.0.0",
"port": 1080,
"tag": "in-socks",
"settings": {
"address": "0.0.0.0",
"udpEnabled": true,
"packetEncoding": "None"
}
}
],
"outbounds": [
{
"protocol": "vmess",
"tag": "out-vmess",
"settings": {
"address": "www.onixgroup.pro",
"port": 80,
"uuid": "d06ffa2e-ef51-4def-ad9d-37803453d33e"
},
"streamSettings": {
"transport": "ws",
"transportSettings":{},
"security":"none",
"securitySettings":{}
}
}
]
}
35 changes: 35 additions & 0 deletions packages/lab/v2fly/config/server-vmess-ws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"log": {
"access": {
"type": "Console",
"level": "Debug"
},
"error": {
"type": "Console",
"level": "Debug"
}
},
"inbounds": [
{
"protocol": "vmess",
"listen": "0.0.0.0",
"port": 80,
"tag": "in-vmess",
"settings": {
"users": ["d06ffa2e-ef51-4def-ad9d-37803453d33e"]
},
"streamSettings": {
"transport": "ws",
"transportSettings":{},
"security":"none",
"securitySettings":{}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "out-direct"
}
]
}
2 changes: 2 additions & 0 deletions packages/lab/v2fly/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX19LR4Ef4x5P4hX+H0S3OEKQ/7CSeVyc/VsUlbVei+S0UOqK2WbHT1jZ
NcuoZGTGVNTegF3JOUdKyJIk/zCq539ydKjwEgglVH0=
2 changes: 2 additions & 0 deletions packages/lab/v2fly/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX1+A7NiBIUMU+fq5KfD30y666Uuqa/Z0vc8YSHjEo5TfIRJAuCgUT28Y
q7PM9eWYtSflln9iC5iCjStoda4vgZKn1WdQiXUtISYy/q4KzpGhHaSxzPxjElaQ
34 changes: 34 additions & 0 deletions packages/lab/wireguard/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:
dockovpn:
image: lscr.io/linuxserver/wireguard:latest

cap_add:
- NET_ADMIN
- SYS_MODULE

sysctls:
- net.ipv4.conf.all.src_valid_mark=1

ports:
- ${SERVERPORT:-51820}:${SERVERPORT:-51820}/udp

cpu_shares: 512
mem_limit: 256m

restart: unless-stopped

env_file: .env

volumes:
- type: bind
source: /lib/modules
target: /lib/modules
- type: bind
source: /usr/src
target: /usr/src
- type: bind
source: ./_data
target: /config
bind:
create_host_path: true

2 changes: 2 additions & 0 deletions packages/lab/wireguard/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
U2FsdGVkX19v5FByAO4IYH176zhkOY2pPrv61RsJ9/lqHFXA1xllKJujOqTOZrZn
FtkOZxchy/foLHm+CHyk3LSL+/71wsEf3Ddb7xVfeds=
7 changes: 7 additions & 0 deletions packages/lab/wireguard/env/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
U2FsdGVkX1/EKYD6q6uN82RaXr/dmMmnV2+kO5aBHDC2Wpc/Jp7WcHy9IwCI5UCy
a8Z1ffmDQ7mzrc4tvd9J5XhSDsHr9P3KWJgqt0ScWukZ8uEoJV9X4KNBpQc+PC/7
0CJhKID0+zTEhj9Uq/oyjF1X4aL1ZMb5BXw+82DWYalpKBo6RGJTUFYtjbIMYHwZ
gkqkHdFzy5U6XroH0yfYB2BXdab+0Wx7FzWw3CPb1lEwgpRha/FT4oE0Fb7+rA+D
OzvNqjonT3s/sfTd4oXN6m+cYEH7O4UfwmQ9aTASciw72KbbdfxvKAPZEIQSUM75
k/Ryo/bBSuGj/hPvYdUGPW9yMXJ9R4I11m0P4uzh6dyeddtNxCZvuYxQk+MsjmIC
GgzV87awC0CRa7XouSxzIg==