Cannot use behind proxy running on a different port #211

Closed
opened 2026-01-19 18:29:26 +00:00 by michael · 3 comments
Owner

Originally created by @cheeseandcereal on GitHub.

Right now, the --proxy-path parameter allows you to run this program behind a web proxy which changes the path of a request, however it does not have a way to take into account the fact that a proxy may also be running on a different port.

For example, if I run this on port 1234 with a web proxy pointing to it at path /ex which is listening on port 80, uploading a file results in the response url: http://localhost:1234/ex/<token>/<file>

This is incorrect, as to go through the proxy, the port must be 80

An option needs to be added (something like --proxy-port) which allows you to specify the port number of a proxy fronting this service.

Originally created by @cheeseandcereal on GitHub. Right now, the `--proxy-path` parameter allows you to run this program behind a web proxy which changes the path of a request, however it does not have a way to take into account the fact that a proxy may also be running on a different port. For example, if I run this on port 1234 with a web proxy pointing to it at path /ex which is listening on port 80, uploading a file results in the response url: `http://localhost:1234/ex/<token>/<file>` This is incorrect, as to go through the proxy, the port must be 80 An option needs to be added (something like `--proxy-port`) which allows you to specify the port number of a proxy fronting this service.
Author
Owner

@paolafrancesca commented on GitHub:

@cheeseandcereal this can be achieved setting the Host header with the port as well
see https://github.com/dutchcoders/transfer.sh/issues/252 for a solution on nginx

@paolafrancesca commented on GitHub: @cheeseandcereal this can be achieved setting the `Host` header with the port as well see https://github.com/dutchcoders/transfer.sh/issues/252 for a solution on nginx
Author
Owner

@paolafrancesca commented on GitHub:

oki

@paolafrancesca commented on GitHub: oki
Author
Owner

@cheeseandcereal commented on GitHub:

That's fine for an HTTP proxy which supports modifying requests, but not for something lower level like a raw TCP proxy, or simple routing/firewall rules which are forwarding between different ports

Would you accept a PR if I implemented --proxy-port ?

@cheeseandcereal commented on GitHub: That's fine for an HTTP proxy which supports modifying requests, but not for something lower level like a raw TCP proxy, or simple routing/firewall rules which are forwarding between different ports Would you accept a PR if I implemented `--proxy-port` ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#211