Commit Graph

33 Commits

Author SHA1 Message Date
Dany Mahmalat
32d2ef14ee Add db-dir to specify where to save boringproxy_db.json 2022-02-21 14:32:31 -05:00
Anders Pitman
0a23c2fc0e Limit token permissions
Added the ability to scope tokens to a specific client. If
enabled, this has the affect of limiting the token to being used
to list tunnels for that specific client. It can't be used for
the web UI or for any state-changing actions such as creating
new tunnels.
2022-02-16 11:44:24 -07:00
Anders Pitman
f8281d95a4 Move some stuff into namedrop library 2021-12-30 20:57:28 -07:00
Anders Pitman
f087863a4b Remove remaining dnsapi code 2021-12-30 17:20:55 -07:00
Anders Pitman
a3140efb20 Implement domain request failure 2021-12-21 15:18:08 -07:00
Anders Pitman
811f25ce3e Fix previous commit 2021-12-21 13:59:55 -07:00
Anders Pitman
0934799ccd Clean up Tunnel struct a bit
Removed unused CssId and moved members that should eventually be
removed from the API surface (ie internal values) to be together
so they're easier to identify later.
2021-12-21 13:57:56 -07:00
Anders Pitman
b795ee0bc9 Remove unused custom SSH key code
Was originally planning to allow people to upload public keys to
use for tunnels, but so far no one has asked for this and I
haven't needed it.
2021-12-21 13:14:01 -07:00
Anders Pitman
7c6077a0fe Implement admin domain with bootstrap domain
TakingNames.io now provides bootstrap domains, which simply
creates an A record based off the ip address of the requesting
server, without requiring any authorization. This allows
boringproxy to always use HTTPS, even when getting the admin
domain.
2021-12-19 21:24:52 -07:00
Anders Pitman
5db952a069 Improve security of TakingNames.io integration
The requests themselves now must be retrieve from the boringproxy
server by TakingNames.io, over HTTPS. This provides several
security benefits:

* You can tell the user the request is coming from a specific
  domain.
* Requests are tied to an ephemeral request-id, to prevent
  prebuilt phishing links.

There is currently a single hard-coded exception for setting a
single A record for an IP address. This is needed for
bootstrapping a service that doesn't have any certs yet (ie the
boringproxy admin domain), and will need to display a big scary
message to users.
2021-12-18 17:40:59 -07:00
Anders Pitman
5b4c148bec Implement TakingNames.io integration
For getting the admin domain. This is particularly nice since it
works using just the IP address over plain HTTP.
2021-12-17 22:18:55 -07:00
Anders Pitman
20f7d53c0f Rename instances of BoringProxy
Full name isn't necessary now that it's a library.

BoringProxy -> Server
BoringProxyClient -> Client
BoringProxyConfig -> Config
2020-12-07 21:50:33 -07:00
Anders Pitman
45f609b8ba Move executable into separate package
Enables us to move towards being able to import as a library.
2020-12-07 21:41:45 -07:00
Anders Pitman
b6d01d59a9 Implement client TLS termination
Managed to reuse the same proxy function the server uses.
2020-11-27 15:36:07 -07:00
Anders Pitman
733b0439e6 Begin implementing TLS passthrough
Basically working, but still needs:

* UI for selecting TLS passthrough
* Client Let's Encrypt integration for automatically getting certs.
* More testing. The changes were pretty invasive.
2020-11-26 22:37:51 -07: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
8477391273 Implement using custom SSH keys 2020-10-23 20:56:55 -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
e51b304275 Make tunnel delete buttons pure CSS 2020-10-16 09:40:46 -06:00
Anders Pitman
85d67e262a Do more authorization checking
Limit certain information based on user and whether they're an
admin.
2020-10-13 11:21:42 -06:00
Anders Pitman
f6faa9c6a7 Add tokens page 2020-10-13 10:32:46 -06:00
Anders Pitman
5cd911f310 Automatically create admin user on first start
Also changed order that extractToken looks for tokens. Used to
be cookies then headers then query. Now in reverse, to make it
easier to override, ie for replacing cookies during login.
2020-10-13 09:48:03 -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
bf3f79fc63 Clean up unused attributes 2020-10-12 18:22:08 -06:00
Anders Pitman
1e25527ab2 Rename sessions to tokens/tokenData 2020-10-11 14:27:32 -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
5b5f474853 Move sessions and tunnels into database 2020-10-05 23:25:36 -06:00