haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
180 stars 744 forks source link

Missing/Extra parameters ? #133

Closed fabricesemti80 closed 1 year ago

fabricesemti80 commented 2 years ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Docker run config used

I actually use Kubernetes

---
# yamllint disable rule:line-length
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: transmission
  namespace: downloads
spec:
  interval: 5m
  chart:
    spec:
      # renovate: registryUrl=https://bananaspliff.github.io/geek-charts
      chart: transmission-openvpn
      version: 0.1.0
      sourceRef:
        kind: HelmRepository
        name: bananaspliff-charts
        namespace: flux-system
      interval: 5m
  install:
    createNamespace: true
    remediation:
      retries: 3
  upgrade:
    remediation:
      retries: 3
  values:
    replicaCount: 1

    image:
      repository: "haugene/transmission-openvpn"
      tag: "latest"
      pullPolicy: "IfNotPresent"

    ingress:
      enabled: false

    env:
      - name: OPENVPN_PROVIDER
        value: "NORDVPN" # VPN provider. List of supported providers: https://haugene.github.io/docker-transmission-openvpn/supported-providers/
      - name: OPENVPN_CONFIG
        value: "france"
      - name: OPENVPN_USERNAME
        value: "${SECRET_OVPN_USER}"
      - name: OPENVPN_PASSWORD
        value: "${SECRET_OVPN_PASS}"
      - name: LOCAL_NETWORK
        value: "${LAN_NETWORK_CIDR}"
      - name: TRANSMISSION_DOWNLOAD_DIR
        value: "/downloads"
      # - name: TRANSMISSION_INCOMPLETE_DIR
      #   value: "/incomplete"
      - name: TRANSMISSION_SCRAPE_PAUSED_TORRENTS_ENABLED
        value: "false"
      - name: PUID
        value: "985"
      - name: PGID
        value: "977"
      - name: TRANSMISSION_WEB_UI
        value: transmission-web-control

    podSecurityContext:
      fsGroup: 977
      runAsUser: 0
      runAsGroup: 0
    volumes:
      - name: "dev-tun" # Needed for VPN
        hostPath:
          path: "/dev/net/tun"
      - name: "transmission-config"
        persistentVolumeClaim:
          claimName: "transmission-config"
      # - name: "transmission-incomplete"
      #   nfs:
      #     server: "${NAS_SERVER}"
      #     path: "${NAS_PATH_MEDIA}/downloads/transmission-incomplete"
      # - name: "transmission-downloads"
        # nfs:
        #   server: "${NAS_SERVER}"
        #   path: "${NAS_PATH_MEDIA}/downlonads/transmission-downloads"
      # - name: "transmission-other"
      #   nfs:
      #     server: "${NAS_SERVER}"
      #     path: "${NAS_PATH_MEDIA}/downloads/transmission-other"

    volumeMounts:
      - name: "transmission-config"
        mountPath: "/data"
        subPath: "configs/transmission-home"
      # - name: "transmission-incomplete"
      #   mountPath: "/incomplete"
      # - name: "transmission-downloads"
      #   mountPath: "/downloads"
      # - name: "transmission-other"
      #   mountPath: "/other"
      # - name: "transmission-incomplete"
      #   mountPath: "/incomplete"
      # - name: "transmission-downloads"
      #   mountPath: "/downloads"
      # - name: "transmission-other"
      #   mountPath: "/other"
      - name: "dev-tun"
        mountPath: "/dev/net/tun" # Needed for VPN

    securityContext:
      capabilities: # Needed for VPN
        add:
          - NET_ADMIN

    resources:
      requests:
        cpu: 48m
        memory: 1555M
      limits:
        memory: 3778M

Current Behavior

Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/nordvpn/france.ovpn:1: html (2.4.7)

Expected Behavior

I understand the pod now generates it's own config - which is nice addition - but it seems it fails somehow...?

How have you tried to solve the problem?

1) Using latest tag 2) Don't know, as pod did not start to allow me to exec into it 3) Do not know, not sure where it is generated; in the PVC I do not see any data 4) Using yaml actually 5) ???

Log output

Full log from the pod:

Running with VPN_CONFIG_SOURCE auto
Provider NORDVPN has a bundled setup script. Defaulting to internal config
Executing setup script for NORDVPN
Downloading user specified config. NORDVPN_PROTOCOL is set to: UDP
2022-08-28 15:55:33 Checking curl installation
2022-08-28 15:55:33 Removing existing configs
2022-08-28 15:55:33 Selecting the best server...
2022-08-28 15:55:33 Searching for group: legacy_p2p
2022-08-28 15:55:33 Searching for technology: openvpn_udp
2022-08-28 15:55:33 Best server : uk2003.nordvpn.com
2022-08-28 15:55:33 Downloading config: default.ovpn
2022-08-28 15:55:33 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/uk2003.nordvpn.com.udp.ovpn
2022-08-28 15:55:33 Using OpenVPN CONFIG :: france
2022-08-28 15:55:33 Downloading config: france.ovpn
2022-08-28 15:55:33 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/france.udp.ovpn
Starting OpenVPN using config france.ovpn
Modifying /etc/openvpn/nordvpn/france.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Setting OpenVPN credentials...
adding route to local network 192.168.0.0/16 via 169.254.1.1 dev eth0
RTNETLINK answers: File exists
Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/nordvpn/france.ovpn:1: html (2.4.7)
Use --help for more information.

HW/SW Environment

- OS: Kubernetes K3S

Anything else?

No response

pkishino commented 2 years ago

switch to :dev branch.. :latest is quite old now. Plus, this is a provider issue, please don:t open provider issues on the main repo