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

Add hop proxy command #58

Merged
merged 9 commits into from
Oct 31, 2024
Merged

Add hop proxy command #58

merged 9 commits into from
Oct 31, 2024

Conversation

Jasonej
Copy link
Contributor

@Jasonej Jasonej commented Oct 18, 2024

This PR adds the hop proxy command.

Running hop proxy in the root of a project will:

  • Assume a local port of 80 (override via --local-port)
  • Read docker-compose.yml or docker/docker-compose.yml for the first entry of VIRTUAL_HOST and use it as the local domain (override via --local-domain)
  • Read docker-compose.override.yml or docker/docker-compose.override.yml for the first entry of VIRTUAL_HOST that does not match the local domain (respecting override if provided) and use it as the proxy domain (override via --proxy-domain)
  • Generate a random port between 10002 and 65535 and use it as the proxy port (override via --proxy-port)

image

@Jasonej Jasonej marked this pull request as ready for review October 18, 2024 14:15
erik-perri
erik-perri previously approved these changes Oct 18, 2024
Bankamah
Bankamah previously approved these changes Oct 18, 2024
jweberst
jweberst previously approved these changes Oct 18, 2024
nemanjar7
nemanjar7 previously approved these changes Oct 18, 2024
jyann
jyann previously approved these changes Oct 18, 2024
exit 1
elif [ "${#HOST_OPTIONS[@]}" -gt "1" ]; then
PS3="Select a Proxy URL (or quit to exit): "
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording threw me off a little. "or type quit to exit" might be a little more clear

@iBotPeaches iBotPeaches merged commit fae818d into master Oct 31, 2024
9 checks passed
@iBotPeaches iBotPeaches deleted the hop-proxy branch October 31, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

10 participants