28 Commits
Author SHA1 Message Date
Anders Pitman aea6c6d2f0 Make client easier to import into other code 2020-12-10 23:14:34 -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 28a67a4285 Fix client TLS termination bug
Problem had to do with certmagic. Details in code.
2020-11-28 11:48:23 -07:00
Anders Pitman 19b843ea40 Implement specifying ACME email as argument 2020-11-27 22:17:07 -07:00
Anders Pitman d09391cc75 Add option to use custom DNS server for client
This is useful for systems like Android which doesn't follow
normal DNS conventions like /etc/resolv.conf, so normal golang
DNS (ie when CGO_ENABLED=0) fails on Android.
2020-11-27 21:31:32 -07:00
Anders Pitman 140c102c32 Implement specifying cert directory
Also fixed a bug where client TLS termination was failing to get
new certs I believe because the TLS listener hadn't started up
yet. I didn't notice it before because I'm running the client and
server on the same machine and the server currently gets certs on
startup even for non-server TLS tunnels
2020-11-27 21:20:38 -07:00
Anders Pitman c08671bd13 Implement setting TlsTermination on server 2020-11-27 16:01:40 -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 58e38d7f19 Implement HTTPS requests from client to upstreams
Can now put "https://" in front of Client Address to force it to
use TLS. It doesn't do any verification of the upstream cert. This
is intended to work similarly to the way ngrok does it:

https://ngrok.com/docs#http-local-https
2020-11-22 13:49:48 -07:00
Anders Pitman 0f3482f836 Reorder todo 2020-10-28 12:59:40 -06:00
Anders Pitman 4fd830167f Fix more security holes 2020-10-27 15:21:56 -06:00
Anders Pitman 7f595c2b0d Start client tunnels concurrently 2020-10-24 17:00:42 -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 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 91d82ff987 Switch client to use go SSH client
Was previously shelling out to `ssh`.

As part of this, I also needed to fix a standing bug where
connections weren't properly being closed.
2020-10-17 16:07:56 -06:00
Anders Pitman e4c3379ed2 Move web ui into separate struct and rename file 2020-10-11 13:45:46 -06:00
Anders Pitman 6d6c0b46bc Reduce number of client panics 2020-10-10 10:04:37 -06:00
Anders Pitman eb4d6903c7 Implement client tunnel synchronization
Client now polls server state and updates tunnels to match.
2020-10-10 09:55:07 -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 57e2e80ed4 Reuse httpClient 2020-10-06 10:22:03 -06:00
Anders Pitman f712499773 Get username and home dir from system 2020-10-03 20:40:14 -06:00
Anders Pitman 7a91738029 Implement basic client
It pretty much only accomplishes what you can already do with a
normal SSH client. The difference is that keys are generated on
the fly by the server and transmitted for the client to use for
the tunnel.
2020-10-02 20:36:28 -06:00
Anders Pitman c285f0990f Run go fmt 2020-10-02 17:09:14 -06:00
Anders Pitman 59c824bfca Start implementing custom ssh server
Turns out SSH has robust semantics for opening generic channels.
Looks like I'll be able to set up tunnels without ever needing to
forward ports on the server, since I can connect the channels with
a custom protocol.

Of course I'll eventually want to support generic SSH clients, but
this makes starting much easier.
2020-10-01 17:22:54 -06:00
Anders Pitman 84b7c0828e Start implementing custom client
Basic SSH plumbing in place. Go makes this way too easy.
2020-09-30 23:49:03 -06:00