Skip to content

Conversation

MironVeryanskiy
Copy link

@MironVeryanskiy MironVeryanskiy commented Nov 24, 2024

Some users opt to put huly behind a tunnel service implementation to avoid opening public-facing ports to their servers.

A tunnel service performs the task of routing external traffic directly to localhost:port of the huly instance.
A tunnel service also offers the option to provide an HTTPS endpoint to browsers without requiring it to be handled by the huly stack directly.
A few tunnel service examples are Cloudflare Zero Trust Tunnel, localhost.run, Tailscale Funnel, and many more anderspitman/awesome-tunneling.

This PR provides the configuration changes and documentation for how to implement a tunnel configuration with the huly project.

@TheFaimous-NoahDolev
Copy link

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Input Handling

The prompt and case handling for NGINX_LOCALHOST_BEHIND_TUNNEL treat empty or invalid input via the default '*' branch, which behaves like a 'no' response but emits a confusing message. Consider consolidating the 'no' and default cases and clarifying the prompt defaults.

read -p "Do you tunnel inbound public traffic directly to localhost:port? (y/N): " NGINX_LOCALHOST_BEHIND_TUNNEL
case "$NGINX_LOCALHOST_BEHIND_TUNNEL" in
    [Yy]* )
        SERVER_ADDRESS="${DOMAIN_NAME}"
        ;;
    [Nn]* )
        SERVER_ADDRESS="${DOMAIN_NAME}:${NGINX_SERVICE_PORT}"
        ;;
    * )
        echo "Proceeding without localhost tunnel configuration"
        SERVER_ADDRESS="${DOMAIN_NAME}:${NGINX_SERVICE_PORT}"
        ;;
esac
Documentation Mismatch

The README refers to 'setup.py' in the instructions, but the script is actually named 'setup.sh'. Update the documentation to match the actual script name to avoid user confusion.

### Run setup.py and provide your configuration
This example will configure Huly to be served publicly over SSL at `https://huly.example.com:12345`\
You need to choose your own hostname and port number.

~/huly-selfhost/nginx$ ./setup.sh
Enter the domain name: huly.example.com
Enter the port you want nginx to expose: 12345
Do you run behind SSL proxy (did you setup HTTPS)? (Y/n): y
Do you tunnel inbound public traffic directly to localhost:port? (y/N): n
Setup is complete. Run 'docker compose up -d' to start the services.

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

Successfully merging this pull request may close these issues.

3 participants