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

Proxy all requests, not just unhandled ones #912

Open
thany opened this issue Jan 23, 2025 · 1 comment
Open

Proxy all requests, not just unhandled ones #912

thany opened this issue Jan 23, 2025 · 1 comment

Comments

@thany
Copy link

thany commented Jan 23, 2025

What's the problem this feature will solve?

I just need a quick forward proxy server, so that I can use my phone to reach a website that is running on my pc locally. I can't reach that local website directly from my phone, because it would require changing the hosts file, which is not possible on mobile.

I also can't change the hostname requirement on this local website, because it requires an impractical amount of time to do so. Not something we're proud of, but it is what it is, for the moment.

Describe the solution you'd like

I would like to be able to execute something like

http-server --proxy http://website.local/ --proxy.all true

Or something. So that opening http://<ipaddress>:8080 doesn't initially show a directory listing of where this command happened to have been executed, but instead shows the website being proxied.

Basically this means it would disable static file serving completely, iyam.

Alternative Solutions

I guess firing up an apache server and doing whatall configuration to get it to work that way, could be an alternative solution, but not one that is very portable and/or easily runnable through a package.json script.

I've looked at a few other static file serving packages, but they don't appear to support forward proxying at all, unless I overlooked something. So my hope remains with this one.

@itslenny
Copy link

itslenny commented Feb 5, 2025

I need this too. I was shocked there isn't a way to do this and more shocked to see someone asking for it just 2 weeks ago. I've been using this library for years, but never needed it to be a pure proxy until now. Hope this can be added.

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

2 participants