apiVersion: v1
kind: ConfigMap
metadata:
  name: trojan-server-config
  namespace: trojan
  labels:
    environment: production
    app: trojan
data:
  server-config: |
    {
        "run_type": "server",
        "local_addr": "0.0.0.0",
        "local_port": 443,
        "remote_addr": "nginx-service",
        "remote_port": 80,
        "password": [
            "password1",
            "password2"
        ],
        "log_level": 2,
        "ssl": {
            "cert": "tls/certificate.crt",
            "key": "tls/private.key",
            "key_password": "",
            "cipher": "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256",
            "prefer_server_cipher": true,
            "alpn": [
                "http/1.1"
            ],
            "reuse_session": true,
            "session_ticket": false,
            "session_timeout": 600,
            "plain_http_response": "",
            "curves": "",
            "dhparam": ""
        },
        "tcp": {
            "prefer_ipv4": false,
            "no_delay": true,
            "keep_alive": true,
            "fast_open": false,
            "fast_open_qlen": 20
        },
        "mysql": {
            "enabled": false,
            "server_addr": "127.0.0.1",
            "server_port": 3306,
            "database": "trojan",
            "username": "trojan",
            "password": ""
        }
    }
