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

Hide port in QRCode to use qrcp behind a reverse proxy #169

Open
1 of 4 tasks
scotow opened this issue Aug 20, 2020 · 3 comments
Open
1 of 4 tasks

Hide port in QRCode to use qrcp behind a reverse proxy #169

scotow opened this issue Aug 20, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@scotow
Copy link

scotow commented Aug 20, 2020

I'm opening this issue because:

  • I have found a bug
  • I want to request a feature
  • I have a question
  • Other

Feature proposal:

Add an option allowing users to hide the port (and the colon) displayed in the QRCode and URL, allowing people to put qrcp behind a reverse proxy.

Problem example:

  1. User creates a reverse proxy entry for qrcp.example.com and forward it to localhost:6666;
  2. User configs qrcp to use port 6666 and fqdn qrcp.example.com;
  3. The generated QRCode redirects to http://qrcp.example.com:6666 instead of qrcp.example.com (:80).

Proposal:

  • Add an option to hide the port and colon in the displayed QRCode, or
  • Allow users to specify a full base URL. This option must conflict with --fqdn and --port option, and could even let users specify the protocol (example: -f https://qrcp.example.com.

Advantages:

  • Cleaner URL;
  • Allows HTTPS if the reverse proxy handle certificate generation (like Caddy);
  • Allows people behind high-restricted proxy (not allowing users to access websites that are not on port 80 or 443), to use qrcp;
  • Using a custom DNS + reverse proxy like presented, allows the use of qrcp behind NATed network (qrcd server is in a NATed network, reverse proxy is on the edge of the network or on a remote server forwarding traffic through SSH tunnel, and user is on a different network like 4G).
@claudiodangelis
Copy link
Owner

Hi, thanks for suggesting, I like this a lot. Let me think about a couple possible implementation and will let you know.
It may take some days, I'm a bit busy lately.

Cheers,
Claudio

@claudiodangelis claudiodangelis self-assigned this Aug 20, 2020
@claudiodangelis claudiodangelis added this to the 0.7.0 milestone Aug 20, 2020
@claudiodangelis claudiodangelis added this to To do in Features via automation Aug 20, 2020
@claudiodangelis claudiodangelis added the enhancement New feature or request label Aug 20, 2020
@scotow
Copy link
Author

scotow commented Aug 20, 2020

Which proposal better fits the project? Adding an option to hide the port? Adding an option to specify a complete base URL? Or maybe something else?

@claudiodangelis
Copy link
Owner

I like the second approach the most, honestly. However, we will have to figure out how not to confuse the end user about what is used and what is just displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Features
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants