Commit Graph

59 Commits

Author SHA1 Message Date
Anders Pitman
41bd4759eb Add ETag hash to tunnel responses 2020-10-10 08:20:17 -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
274725b5c5 Add HTTP>HTTPS redirection
Required switching to TLS for LetsEncrypt, so I could disable
the HTTP ACME handler. Pretty sure there's a way to keep them
both enabled but this is fine for now.
2020-10-07 10:44:37 -06:00
Anders Pitman
f234049877 Add X-Forwarded-Host header to upstream requests 2020-10-07 09:18:04 -06:00
Anders Pitman
13e998e87d Restrict file permissions before writing key 2020-10-07 09:04:01 -06:00
Anders Pitman
bf54f27815 Add tunnel creation script 2020-10-06 19:00:40 -06:00
Anders Pitman
03baac2c7b Implement tunnel delete for /api 2020-10-06 19:00:20 -06:00
Anders Pitman
57e2e80ed4 Reuse httpClient 2020-10-06 10:22:03 -06:00
Anders Pitman
6ee5a5d3f4 Move /tunnels GET to /api 2020-10-05 23:37:03 -06:00
Anders Pitman
5b5f474853 Move sessions and tunnels into database 2020-10-05 23:25:36 -06:00
Anders Pitman
2c4b97c0e2 Switch from TLS to HTTP proxying
Allows a few things:

* Can terminate HTTP/2 without the upstream needing to implement
  it
* Allows modification of headers in both directions
* Allows logging at the proxy
2020-10-05 18:12:31 -06:00
Anders Pitman
80556785d0 Move admin page stuff into separate file 2020-10-05 16:13:01 -06:00
Anders Pitman
f712499773 Get username and home dir from system 2020-10-03 20:40:14 -06:00
Anders Pitman
2134407616 Remove deleted tunnels from authorized_keys file 2020-10-02 20:53:46 -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
be91ff62ef Use AdminDomain for ssh server address 2020-10-02 17:07:24 -06:00
Anders Pitman
8a37355bb6 Implement openssh key management
I had been moving in the direction of implementing a custom SSH
server in golang. That would be pretty easy if using a custom
application protocol, but I want to support tcpip-forward which
looks like it would be a lot more work. It also would be nice to
support generic CLI clients like OpenSSH.

The point of using SSH in the first place is that it's known to be a
solid tunneling solution. To that end, I've decided to rely on
OpenSSH for now, since that program may have tunneled more bits than any
other since the dawn of time. This requires a bit of hackery to generate
SSH keys and place them in authorized_keys (as well as shipping the
private key to the client), but I think this will work well for now.

Plus OpenSSH is already installed on pretty much every server
I'd expect to run boringproxy.
2020-10-02 16:57:09 -06:00
Anders Pitman
95ab97f043 Move password handling so we can extract it 2020-10-01 17:42:38 -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
Anders Pitman
10f79beec6 Add error handling for cert failure 2020-09-29 23:24:22 -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
Anders Pitman
bae4eaf02d Modify login for browser forms instead of API 2020-09-29 22:03:34 -06:00
Anders Pitman
0cb3250711 Add go.rice dependency 2020-09-29 20:51:57 -06:00
Anders Pitman
b83fd6eb41 Start using go modules 2020-09-29 20:26:02 -06:00
Anders Pitman
58bd38befd Run go fmt 2020-09-29 20:12:54 -06:00
Anders Pitman
17b37ab2ed Remove SirTunnel stuff from readme 2020-09-29 15:53:10 -06:00
Anders Pitman
b351a4265d Replace persistTunnels with saveJson function 2020-09-28 22:49:52 -06:00
Anders Pitman
42f4695381 Start implementing auth 2020-09-28 22:46:35 -06:00
Anders Pitman
501af0c3dc Start implementing main config 2020-09-28 14:07:54 -06:00
Anders Pitman
92affa7718 Implement tunnel persistence between restarts 2020-09-28 13:46:01 -06:00
Anders Pitman
6302bba56c Remove yet-another SirTunnel file... 2020-09-27 23:22:26 -06:00
Anders Pitman
9206371411 Remove some more SirTunnel files 2020-09-27 23:21:38 -06:00
Anders Pitman
99da909cde Remove a couple old SirTunnel files 2020-09-27 22:27:31 -06:00
Anders Pitman
f24b5fe77b Integrate CertMagic for auto TLS certs 2020-09-27 22:24:03 -06:00
Anders Pitman
09770d2c7a Split into separate files and add todo 2020-09-26 15:56:57 -06:00
Anders Pitman
c55b7283ec Implement tunnel delete 2020-09-26 15:47:56 -06:00
Anders Pitman
98a049b2e6 Implement basic SNI routing and HTTP admin stuff
* Tunnels work
* Can list and dynamically add tunnels via HTTP
2020-09-26 15:41:47 -06:00
Anders Pitman
faa4ca503b Rename to boreman for now 2020-09-26 15:41:01 -06:00
Anders Pitman
c4321d1bbd Rename main.go 2020-09-25 16:46:58 -06:00
Anders Pitman
8571e380a6 Remove license
May want to do BSL or similiar
2020-09-25 16:43:27 -06:00
Anders Pitman
6ce1c347ae Make host and port separate arguments 2020-09-23 13:18:01 -06:00
Anders Pitman
864236c1fa Standard client is not unique 2020-09-23 10:47:02 -06:00
Anders Pitman
f7689465fc Add instructions for running server 2020-09-23 10:39:14 -06:00
Anders Pitman
1008abdc44 Write first draft of readme 2020-09-23 10:28:18 -06:00
Anders Pitman
d07e056b6e
Create README.md 2020-09-23 09:54:47 -06:00