Commit Graph
46 Commits
Author SHA1 Message Date
Anders Pitman c08671bd13 Implement setting TlsTermination on server 2020-11-27 16:01:40 -07:00
Anders Pitman 4fd830167f Fix more security holes 2020-10-27 15:21:56 -06:00
Anders Pitman b3f1636be6 Fix some security issues
* The CSS styles were leaking information about tunnels, even for
  things like the login page, which can be sent to anyone.
* Tokens could be created for any user by any user.
2020-10-26 12:18:51 -06:00
Anders Pitman 1abc141d13 Make client selection a dropdown
Also implemented adding and deleting clients through the API.
2020-10-24 16:48:53 -06:00
Anders Pitman 1607d41e5c Add button for downloading private keys
Allows users to access tunnels using standard SSH clients.
2020-10-24 14:12:18 -06:00
Anders Pitman 2ca14901fc Disable custom SSH keys for now
Not sure the feature is boring enough to keep. There are some tricky
things that still need to be solved like figuring out how to let
tunnels share the same public key, since the OpenSSH server seems to
only pick up the first instance of each key in the authorized_keys
file.

Also, what happens if someone wants to use their normal SSH key for
the server for a boringproxy tunnel. I could easily introduce a bug
that would lock someone out of their server in certain corner cases.

I think adding the ability to download the private key for each tunnel
will handle most cases for now.
2020-10-24 13:27:41 -06:00
Anders Pitman 8477391273 Implement using custom SSH keys 2020-10-23 20:56:55 -06:00
Anders Pitman f9f2155ab1 Add logo for favicon 2020-10-21 10:53:51 -06:00
Anders Pitman fd0451fa3b Implement password-protected tunnels 2020-10-20 20:03:59 -06:00
Anders Pitman 85a5004cc7 Implement raw TCP tunnels
Just needed to add an option to allow external connections to the
ports from the server, then set the proper values in the
authorized_keys file and on the client.
2020-10-20 19:14:04 -06:00
Anders Pitman 9882017d5a Add ClientAddress
Allows tunnels to specify what address the client with connect to
for upstream connections.

Also changed the tunnel-adder UI.

Also fixed a bug where invalid domains would crash. Needed to
properly return an error dialog.
2020-10-20 18:52:32 -06:00
Anders Pitman ef660f61ae Fix loading page 2020-10-20 17:58:19 -06:00
Anders Pitman 80d7f2115b Clean up UI a ton 2020-10-19 12:25:04 -06:00
Anders Pitman 0e39e9dd57 Add QR code login URLs for tokens
Also set cookies to max age of a year rather than session cookies.
2020-10-18 18:39:30 -06:00
Anders Pitman 2d7f985311 Fix Firefox silently deleted tunnels
Debugging notes:

* The act of refreshing a page can delete tunnels created by other UI
  sessions, I think because it has local CSS checkbox state.
  * Happens on firefox desktop and mobile. Here's how to reproduce:
    1. Load the UI in Chrome and FF.
    2. Delete the last tunnel from FF.
    3. Add it back in Chrome.
    4. Refresh FF. The tunnel will be silently deleted.
  * I'm pretty sure this is bugged behavior in FF, because the checkboxes have
    completely unique ids, but it's treating them like the same checkbox.
  * Setting autocomplete='off' on the input elements seems to fix the problem.
    Not sure if it will work correctly in all browsers.
2020-10-17 09:48:29 -06:00
Anders Pitman ca89553354 Make UI more consistent 2020-10-17 09:19:59 -06:00
Anders Pitman 18e09120a7 Change delete to work without a page navigation.
Uses more CSS checkbox hackery.
2020-10-17 08:42:29 -06:00
Anders Pitman cca211de0e Implement loading screen for slow requests 2020-10-16 11:21:41 -06:00
Anders Pitman 9aafa18254 Change delete buttons to forms 2020-10-16 10:25:09 -06:00
Anders Pitman e51b304275 Make tunnel delete buttons pure CSS 2020-10-16 09:40:46 -06:00
Anders Pitman 2eafde030e Clean up menu stuff
Also only send /users page when isAdmin is true
2020-10-15 13:20:59 -06:00
Anders Pitman 7df93c0821 Highlight selected page
Needed to change HTML architecture to inline multiple independent
copies of the menu. There might be a cleaner way to do this, but
it will work for now.
2020-10-15 13:01:15 -06:00
Anders Pitman 102bb152de Remove references to colored buttons 2020-10-15 10:45:07 -06:00
Anders Pitman 20b473e61f Switch to monochrome buttons 2020-10-15 10:42:38 -06:00
Anders Pitman f911ca3b1a Implement logout button 2020-10-15 10:05:09 -06:00
Anders Pitman 4c78059e66 Overhaul UI architecture
Learned about the :target CSS selector, which can be used to
replace content depending on the current URL hash. This allows
making a sort of single page app without JavaScript.

Currently experimenting with returning all the pages in a single
request, then switching between them with :target. Seems to be
working quite well so far.
2020-10-15 09:50:12 -06:00
Anders Pitman fb8d379663 Create UI tunnels through API 2020-10-14 10:29:19 -06:00
Anders Pitman df6daa5bbd Forgot to add some of the templates 2020-10-13 11:29:56 -06:00
Anders Pitman f6faa9c6a7 Add tokens page 2020-10-13 10:32:46 -06:00
Anders Pitman 617444946d Break menu into separate file 2020-10-13 10:04:12 -06:00
Anders Pitman 02f9887b9d Implement alert dialog 2020-10-12 22:26:33 -06:00
Anders Pitman 9cc1a8afa6 Implement user delete 2020-10-12 22:17:36 -06:00
Anders Pitman d3b25d5c38 Implement adding users from UI 2020-10-12 19:51:13 -06:00
Anders Pitman 238b66fb9b Handle webui auth in central location 2020-10-12 19:13:43 -06:00
Anders Pitman a749fc0b46 Share HTML head section amongst pages 2020-10-12 18:39:35 -06:00
Anders Pitman 31ea48365f Use Post/Redirect/Get pattern for login 2020-10-11 15:22:58 -06:00
Anders Pitman 2ca7800ca6 Replace email login with direct token login 2020-10-11 15:18:33 -06:00
Anders Pitman d04804e8ac Include styles on login page 2020-10-11 14:10:30 -06:00
Anders Pitman 1b4e6beb61 Implement confirm dialog
Also moved shared styles to separate file which is included by
templates.
2020-10-11 13:32:10 -06:00
Anders Pitman af539f4d68 Add menu to ui 2020-10-11 11:13:08 -06:00
Anders Pitman 1070c53107 Add some color to the buttons 2020-10-11 10:35:30 -06:00
Anders Pitman eaddc4441a Change delete link into button 2020-10-09 10:15:55 -06:00
Anders Pitman ffc0d27338 Start implementing remote-controlled clients 2020-10-09 10:05:31 -06:00
Anders Pitman 6c2db42c2a Store full tunnel information in db
Now have a single Tunnel type which is returned on creation and
when querying the current tunnels.
2020-10-08 12:51:52 -06:00
Anders Pitman 9bd415af50 Implement add/delete tunnels from UI 2020-09-29 23:10:06 -06:00
Anders Pitman bcd786e5d8 Get basic UI plumbing in place 2020-09-29 22:29:30 -06:00