Start setting up shadowsocks

This commit is contained in:
Nikolai Rodionov 2024-02-20 15:44:31 +01:00
parent a6b30b3337
commit a20017c9b7
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 82 additions and 0 deletions

View File

@ -2,6 +2,10 @@ service:
type: LoadBalancer type: LoadBalancer
externalTrafficPolicy: Local externalTrafficPolicy: Local
ports: ports:
- name: shadowsocks
port: 8388
protocol: TCP
targetPort: 8388
- name: minecraft - name: minecraft
port: 25565 port: 25565
protocol: TCP protocol: TCP

View File

@ -0,0 +1,78 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: shadowsocks-deployment
labels:
app: shadowsocks
spec:
replicas: 1
selector:
matchLabels:
app: shadowsocks
template:
metadata:
labels:
app: shadowsocks
spec:
containers:
- name: shadowsocks-libev
image: shadowsocks/shadowsocks-libev
env:
- name: METHOD
value: chacha20-ietf-poly1305
- name: PASSWORD
value: test12345
ports:
- containerPort: 8388
securityContext:
capabilities:
add:
- NET_ADMIN
---
apiVersion: v1
kind: Service
metadata:
name: shadowsocks
labels:
app: shadowsocks
spec:
type: ClusterIP
ports:
- port: 8388
protocol: TCP
selector:
app: shadowsocks
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: badhouseplants-shadowsocks
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: tcp
number: 8388
protocol: TCP
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: shadowsocks
spec:
gateways:
- istio-system/badhouseplants-shadowsocks
hosts:
- '*'
tcp:
- match:
- port: 8388
route:
- destination:
host: shadowsocks
port:
number: 8388