GithubHelp home page GithubHelp logo

Comments (3)

jonreeves avatar jonreeves commented on May 13, 2024

Would be really useful because most of my projects that run Apache or Nginx are expecting to respond only to a particular Host request.

from go-http-tunnel.

findmyway avatar findmyway commented on May 13, 2024

Any update here?

I encounter a problem, not sure whether it is related to this thread.

My website is using the 4444 port on the server. By using Nginx, I proxy request to 80 port to my website.

In the meantime, I want to use go-http-tunnel to access my local machine, so I set the go-http-tunnel service listen port 5555(since 80 is already been used). And I write the nginx config as follows:

server{
    listen 80;
    server_name  tunnel.myownsite.com;

    access_log /var/log/nginx/tunnel_access.log;
    error_log /var/log/nginx/tunnel_error.log;

    location / {
        proxy_pass http://localhost:5555/;
        proxy_set_header Host $http_host;
    }
}

The client config is as follows:

server_addr: 52.183.47.200:4567
insecure_skip_verify: true
tunnels:
  webui:
    proto: http
    addr: localhost:8080
    host: localhost

On my server, I can use wget localhost:5555 to access the local machine. Request of tunnel.myownsite.com said

client not subscribed

Thank you very much!

from go-http-tunnel.

K1Z4 avatar K1Z4 commented on May 13, 2024

In case anyone else has the same issue:

If you're having issues after using Nginx as a reverse proxy you should try adding the following to your location block:

proxy_set_header Host $host;

More details here

from go-http-tunnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.