Add UDP traefik route to shadowsocks

This commit is contained in:
Nikolai Rodionov 2024-09-20 17:07:12 +02:00
parent 2720e03698
commit e4434c7617
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
6 changed files with 73 additions and 26 deletions

View File

@ -54,6 +54,13 @@ templates:
alias: traefik
values:
- '{{ requiredEnv "PWD" }}/values/common/values.tcp-route.yaml'
ext-udp-routes:
dependencies:
- chart: bedag/raw
version: 2.0.0
alias: traefik-udp
values:
- '{{ requiredEnv "PWD" }}/values/common/values.udp-route.yaml'
ext-traefik-middleware:
dependencies:
- chart: bedag/raw

View File

@ -93,6 +93,7 @@ releases:
- template: default-env-secrets
- template: default-env-values
- template: ext-tcp-routes
- template: ext-udp-routes
- name: navidrome
chart: allangers-charts/navidrome
namespace: applications

View File

@ -6,3 +6,11 @@ traefik:
match: HostSNI(`*`)
entrypoint: shadowsocks
port: 8388
traefik-udp:
enabled: true
tcpRoutes:
- name: shadowsocks-libev
service: shadowsocks-libev-shadowsocks
match: HostSNI(`*`)
entrypoint: shadowsocks-udp
port: 8388

View File

@ -16,18 +16,18 @@ ports:
default: true
exposedPort: 1194
protocol: TCP
valve-server:
port: 27015
expose:
default: true
exposedPort: 27015
protocol: UDP
valve-rcon:
port: 27015
expose:
default: true
exposedPort: 27015
protocol: TCP
# valve-server:
# port: 27015
# expose:
# default: true
# exposedPort: 27015
# protocol: UDP
# valve-rcon:
# port: 27015
# expose:
# default: true
# exposedPort: 27015
# protocol: TCP
smtp:
port: 25
protocol: TCP
@ -45,7 +45,7 @@ ports:
protocol: TCP
exposedPort: 587
expose:
default: true
default: true
imap:
port: 143
protocol: TCP
@ -82,3 +82,9 @@ ports:
exposedPort: 8388
expose:
default: true
shadowsocks-udp:
port: 8388
protocol: UDP
exposedPort: 8388
expose:
default: true

View File

@ -0,0 +1,19 @@
traefik-udp:
templates:
- |
{{ range .Values.tcpRoutes }}
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: {{ .name }}
spec:
entryPoints:
- {{ .entrypoint }}
routes:
- match: {{ .match }}
services:
- name: {{ .service }}
nativeLB: true
port: {{ .port }}
{{- end }}

View File

@ -16,18 +16,18 @@ ports:
default: true
exposedPort: 1194
protocol: TCP
valve-server:
port: 27015
expose:
default: true
exposedPort: 27015
protocol: UDP
valve-rcon:
port: 27015
expose:
default: true
exposedPort: 27015
protocol: TCP
# valve-server:
# port: 27015
# expose:
# default: true
# exposedPort: 27015
# protocol: UDP
# valve-rcon:
# port: 27015
# expose:
# default: true
# exposedPort: 27015
# protocol: TCP
smtp:
port: 25
protocol: TCP
@ -45,7 +45,7 @@ ports:
protocol: TCP
exposedPort: 587
expose:
default: true
default: true
imap:
port: 143
protocol: TCP
@ -82,3 +82,9 @@ ports:
exposedPort: 8388
expose:
default: true
shadowsocks-udp:
port: 8389
protocol: UDP
exposedPort: 8389
expose:
default: true