wstunnel icon indicating copy to clipboard operation
wstunnel copied to clipboard

Configuration file

Open Krock21 opened this issue 10 months ago • 4 comments

Describe the feature

I want to be able to run wstunnel [server | client] --configuration wstunnel.conf

  • wstunnel.conf can contain port mappings and other configurations
  • changing wstunnel.conf leads to configuration reload (Like --tls-certificate and --tls-private-key file change does)

Describe the reason for such feature

Command line has a limit, which matters if you map many ports (multiple -L or -R arguments) Use case: mapping range of ports to a different range of ports

Describe alternatives you've considered

An alternative feature that may help is to allow mapping of port ranges

Krock21 avatar Feb 04 '25 13:02 Krock21

Hello,

For port-mapping you can already do it by using the restriction config https://github.com/erebe/wstunnel/blob/main/restrictions.yaml#L54

erebe avatar Feb 04 '25 15:02 erebe

Is there a way to pass http-upgrade-path-prefix and restrict-http-upgrade-path-prefix from Configuration file?

calvin2021y avatar Feb 06 '25 05:02 calvin2021y

You can set restrict-http-upgrade-path-prefix with https://github.com/erebe/wstunnel/blob/main/restrictions.yaml#L12

erebe avatar Feb 06 '25 13:02 erebe

Does anyone know how to specify multiple --restrict-to DEST:PORT options in config file?

laikitleung avatar Mar 23 '25 02:03 laikitleung

This is an example of how I'm using wstunnel in reverse tunnel mode with multiple tunnels each with separate credential and port:

restrictions:
    - name: device1
      description: device1
      match:
        - !PathPrefix "^apassword$"
      allow:
        - !ReverseTunnel
          protocol:
            - Tcp
          port:
            - 26667
    - name: device2
      description: device2
      match:
        - !PathPrefix "^anotherpassword$"
      allow:
        - !ReverseTunnel
          protocol:
            - Tcp
          port:
            - 19716

chibbert avatar Apr 17 '25 10:04 chibbert