Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any help with config for this scenario? #403

Open
essoojay opened this issue Sep 3, 2023 · 5 comments
Open

Any help with config for this scenario? #403

essoojay opened this issue Sep 3, 2023 · 5 comments

Comments

@essoojay
Copy link

essoojay commented Sep 3, 2023

Am a complete noob whenit comes to this, and i want to know if its possible to implement sslh for below situation:
And if possible help with a config template.

NOTE, i have tried with on-timeout anyprot but could not get it to work ..

Share port 443 ssl with:
V2ray
sstp vpn

And Port 80 with:
http proxy
ohpserver

Thanks

@ljluestc
Copy link

# Listen for incoming traffic on port 443
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 443
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: v2ray
    host: localhost
    port: 10000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

  - name: sstp_vpn
    host: localhost
    port: 20000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

# Listen for incoming traffic on port 80
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 80
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: http_proxy
    host: localhost
    port: 30000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

  - name: ohp_server
    host: localhost
    port: 40000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

@essoojay
Copy link
Author

# Listen for incoming traffic on port 443
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 443
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: v2ray
    host: localhost
    port: 10000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

  - name: sstp_vpn
    host: localhost
    port: 20000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

# Listen for incoming traffic on port 80
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 80
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: http_proxy
    host: localhost
    port: 30000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

  - name: ohp_server
    host: localhost
    port: 40000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

Thank you for your help. I tried as .cfg and i got syntax error

root@localhost:~# sslh -F /etc/sslh/sslh.cfg
/etc/sslh/sslh.cfg:3:syntax error

what could be wrong..

@ljluestc
Copy link

# Listen for incoming traffic on port 443
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 443
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: v2ray
    host: localhost
    port: 10000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

  - name: sstp_vpn
    host: localhost
    port: 20000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true
    service: tls

# Listen for incoming traffic on port 80
listen:
  - protocol: tcp
    host: 0.0.0.0
    port: 80
    on-timeout: anyproto
    timeout: 1

# Define the services to forward traffic based on the protocol
services:
  - name: http_proxy
    host: localhost
    port: 30000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

  - name: ohp_server
    host: localhost
    port: 40000
    protocol: tcp
    timeout: 5
    no-delay: false
    skip-probe: true

@yrutschle
Copy link
Owner

This is not libconfig file format, it looks vaguely like YAML (although I don't think it is, either): what config format is that? How do you use it?
As it is, I don´t think this is even close to being helpful to configure sslh...

@essoojay
Copy link
Author

This is not libconfig file format, it looks vaguely like YAML (although I don't think it is, either): what config format is that? How do you use it? As it is, I don´t think this is even close to being helpful to configure sslh...

Please help with the right config, for the scenario i have. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants