Commit Graph

243 Commits

Author SHA1 Message Date
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
38cb381051 HTTPS by default, but allow HTTP 2021-12-20 22:37:50 -07:00
Anders Pitman
2745e02b8b
Merge pull request #118 from boringproxy/allow-other-ports
Implement binding non-default ports
2021-12-20 20:56:55 -07:00
Anders Pitman
30358d7808 Implement binding non-default ports
Can now bind to ports other than 80/443, using the -http-port and
-https-port arguments.

Assuming you already have the certs you need, HTTPS even works.

Unfortunately you can't get the certs automatically because
LetsEncrypt doesn't support ports other than 80/443 as far as I
know.
2021-12-20 12:56:50 -07:00
Anders Pitman
cf281fa7f2 Merge branch 'takingnames-io-integration' 2021-12-20 00:46:58 -07:00
Anders Pitman
8f39130674 Add QR code to printed login info 2021-12-20 00:46:26 -07:00
Anders Pitman
cfdae775fa
Merge pull request #115 from boringproxy/takingnames-io-integration
Takingnames io integration
2021-12-19 21:46:46 -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
8653583cec Add some common proxy headers
Added X-Forwarded-For and Forwarded for server TLS termination.
Haven't yet figured out a way to make this work for client TLS
termination.
2021-12-19 19:38:17 -07:00
Anders Pitman
49c467f85c Rename webdo to dnsapi
Still need a better name
2021-12-19 17:08:11 -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
2d4465f665 Use the admin domain with HTTPS for redirect
When using TakingNames.io for getting a domain for a new tunnel,
previously it redirected to the public IP of the server over HTTP.

Now uses the admin domain over HTTPS.
2021-12-17 22:22:44 -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
4093472109 Enable ACME http-01 challenge
Only for server TLS termination
2021-12-17 20:26:20 -07:00
Anders Pitman
334549cb05 First draft of TakingNames.io integration 2021-12-15 14:34:06 -07:00
Anders Pitman
aa6ab77a05 Verify public IP on startup
Currently checks to make sure ports 80 and 443 are accessible.
Using api.ipify.org to determine public IP. Need to add fallbacks
in case that fails.
2021-12-15 14:33:01 -07:00
Anders Pitman
e70cc5cc13 Add more info on tunnel pages 2021-12-15 13:10:54 -07:00
Anders Pitman
c09219ecbf Add SSH key download button 2021-12-15 11:43:54 -07:00
Anders Pitman
ffe05ccdb4 Simplify tunnel editor page 2021-12-14 16:52:26 -07:00
Anders Pitman
fb3f4b4eee Fix border colors 2021-12-14 16:34:35 -07:00
Anders Pitman
ad6be0f6a9 Improve proxyConn comments 2021-12-14 15:43:06 -07:00
Anders Pitman
87cbeb4862 Finish removing go rice 2021-12-14 15:04:34 -07:00
Anders Pitman
93647182ad Remove go rice from build 2021-12-14 14:58:38 -07:00
Anders Pitman
898a520c55 Run go fmt 2021-12-14 14:54:32 -07:00
Anders Pitman
d13486ce2c Fix logo loading 2021-12-14 14:54:16 -07:00
Anders Pitman
94a3316e2f Remove old CSS UI 2021-12-14 14:44:04 -07:00
Anders Pitman
60fbfac081 Implement first draft of HTML UI
The UI was originally written using fancy HTML checkbox toggle
hacks in order to make the UI very fast. It's cool but complicated
and difficult to change. In order to make updates to the UI more
quickly, I'm changing it to use traditional HTML with full page
reloads for navigation. It's not as fast but much simpler.
2021-12-14 14:06:25 -07:00
Anders Pitman
aa04f15283
Merge pull request #107 from boringproxy/add-bsd-builds
Add freebsd and openbsd builds
2021-12-05 13:02:20 -07:00
Anders Pitman
b887f40b93 Add freebsd and openbsd builds 2021-12-05 12:59:05 -07:00
Anders Pitman
82241ecc0c
Merge pull request #106 from boringproxy/fix-authorized-keys
Fix authorized keys
2021-12-05 12:48:55 -07:00
Anders Pitman
b9d07f9663 Prevent duplicate domains
Now checks to make sure a domain isn't already used by a previous
tunnel. This prevents accidental silent modifications to tunnels
and also fixes a bug where multiple entries were being made in
the authorized_keys file.
2021-12-03 17:50:02 -07:00
Anders Pitman
12ec55cf37 Clear authorized_keys before writing
Was writing both the old content of authorized_keys and the new
tunnel every time a tunnel was created. This essentially made the
file double in size for every new tunnel added.
2021-12-03 17:38:06 -07:00
Anders Pitman
e4b6598274 Don't follow redirects in client HTTP client 2021-10-02 11:04:47 -06:00
Anders Pitman
0bb64b23b3
Merge pull request #81 from nickshanks347/master
Update Dockerfile to build properly
2021-04-06 21:35:45 -06:00
Nick
65106da6f7
Update Dockerfile to build properly
Credit goes to iamcgn at https://www.reddit.com/r/docker/comments/mh35w3/architecture_issue_with_running_a_docker_project/ for creating this Dockerfile.
2021-04-01 22:20:17 +01:00
Anders Pitman
7d430f581e
Update README.md 2021-03-29 11:13:28 -06:00
Anders Pitman
5b4f685392
Merge pull request #78 from fbartels/docker-fix
Specify output filename and set executable permissions
2021-03-29 11:02:13 -06:00
Felix Bartels
64a1a6beb4 Specify output filename and set executable permissions
Signed-off-by: Felix Bartels <felix@9wd.eu>
2021-03-29 08:33:40 +02:00
Anders Pitman
bab13efdbf Strip connection headers
When going from HTTP/1.1 to HTTP/2
2021-02-22 23:04:43 -07:00
Anders Pitman
37774429df Fix cancellation 2021-02-17 10:56:29 -07:00
Anders Pitman
2b74f6ee0c Implement selecting tunnel port
This is useful for when you want to use boringproxy more like a
normal reverse proxy, ie if boringproxy and your service are on
the same machine, you can just use the port of the service as the
tunnel port and boringproxy will forward directly to it without
using SSH.

This would normally be used with no client set.
2021-02-16 18:37:31 -07:00
Anders Pitman
ffc8e45e85 Make Client Name options less ambiguous
Choosing client "Any" is confusing, as it suggests any client
can connect to the tunnel. In reality this options means no client
can connect to the tunnel. Changed it to "No client" in the UI and
"none" in the database.
2021-02-16 18:12:34 -07:00
Anders Pitman
e0ef693e99 Create authorized_keys file if it doesn't exist
Fixes #53
2021-02-15 12:24:54 -07:00
Anders Pitman
349ec7997f Forget some stuff
Fixes #45
2021-02-15 12:24:12 -07:00
Anders Pitman
680bb38c50 Change naming from amd64 ro x86_64
amd64 was too similar to arm64 which caused confusion for the
downloads.

Fixes #45
2021-02-15 12:00:36 -07:00
Anders Pitman
8753c11f57 Fix invalid method HTTP error code
Fixes #54
2021-02-15 11:50:27 -07:00
Anders Pitman
c3a182e956
Merge pull request #50 from luke2m/patch-1
Add README.md file for the docs
2021-02-07 21:11:36 -07:00
luke2m
a0515a55db
Add readme file for the docs 2021-02-07 07:57:03 -05:00
Anders Pitman
420b02c093 Pass context down 2021-01-23 11:25:29 -07:00
Anders Pitman
56e9f0244b Remove more log.Fatals
Also tried to simplify the sync logic somewhat.
2021-01-23 11:16:50 -07:00