Commit Graph

199 Commits

Author SHA1 Message Date
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
Anders Pitman
884a887b6a Return errors instead of exiting
Also removed one level of goroutine from BoreTunnel
2021-01-23 10:07:26 -07:00
Anders Pitman
10c0958c36 Default to upserting tunnels 2021-01-23 09:17:28 -07:00
Anders Pitman
dd7bbf7314 Set some JSON encoding options 2021-01-22 22:04:14 -07:00
Anders Pitman
8e743ad304 Properly set owner on tunnel creation 2021-01-22 22:03:57 -07:00
Anders Pitman
e09a7d91df Override tunnel SSH server ports at runtime
This is a bit of a hack. Problem is if the server is restarted
with a different SSH port, all the tunnels in the db have the
incorrect port setting, so we're overriding at runtime.

Really should update all the db entries but that's messy too.

Probably the real solution is to decouple runtime tunnel settings
from permanent tunnel settings, and only store the permanent ones
in the db.
2021-01-13 10:22:19 -07:00
Anders Pitman
c0f884f049 Improve argument parsing and error messages 2021-01-08 14:18:51 -07:00
Anders Pitman
72fe16abe6 Remove Android builds
The linux-arm builds work fine on Android.
2021-01-08 13:52:07 -07:00
Anders Pitman
4150f87aec Merge branch 'update-master' into merge-upstream 2021-01-06 10:22:11 -07:00
Anders Pitman
e419be6f05 Move main.go 2021-01-06 10:08:59 -07:00
Anders Pitman
ee96c2e457
Merge pull request #27 from voidrot/systemd-setup
Systemd Integration and Docs
2021-01-05 17:24:02 -07:00
Buck Brady
d6ff17de5a fixing curl/wget to not use sudo 2021-01-05 17:09:21 -07:00
Anders Pitman
abe36a58d1
Merge pull request #29 from arp242/admin-domain
Use "fmt.Print()" instead of "log.Print()" when asking for admin domain
2021-01-05 09:31:16 -07:00
Anders Pitman
40fda7776f
Merge pull request #28 from arp242/usage
Add usage information
2021-01-05 09:30:57 -07:00
Martin Tournoij
384b42ef54 Use "fmt.Print()" instead of "log.Print()" when asking for admin domain
When using "boringproxy server" it asks for the admin domain. All grand,
but it looks rather strange:

	2021/01/05 22:11:05 Starting up
	2021/01/05 22:11:05 Enter Admin Domain:
	[cursor is here]

It wasn't really clear to me this was asking a question, as it includes
the date like a log message and the cursor is on the next line.

So, change it to just fmt.Print()

Maybe the "starting up" should also be moved a bit further down, but
that would conflict with my other PR 🙃
2021-01-05 22:12:25 +08:00
Martin Tournoij
a67253c55a Add usage information
Before not giving any command didn't really give much feedback beyond
"invalid arguments". This adds a basic usage message, and tells people
that you can use "boringproxy server -h".

I moved the "Starting up" log message because otherwise that would get
printed when asking for "server -h".

I also added error checks for the flag parsing; I think this isn't
*strictly* needed, but I remember running in to problems once by
omitting it (although I've forgotten what that problem was, exactly).
2021-01-05 22:04:08 +08:00
Buck Brady
8efb6c4491 fixed server service download command url 2021-01-04 23:42:05 -07:00
Buck Brady
c027c22aa5 small cleanup to systemd docs 2021-01-04 23:27:43 -07:00
Buck Brady
8ae5acac4c corrected project name and fixed docs/systemd files as requested. 2021-01-04 23:24:32 -07:00
Buck Brady
9da3db7a17 adding systemd service files and howto docs 2021-01-04 02:40:17 -07:00
Anders Pitman
ddb11d00ec Switch to streaming requests
Previously we were reading the entire downstream request into
memory before making the new request to the upstream. Now we're
just passing it through. Might be some dragons here (already ran
into issues with Content-Length) but seems to be working so far.
2020-12-22 14:47:03 -07:00
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
7034cb8671 Avoid unnecessary server certs
The server doesn't need to get certs unless TlsTermination is set
to server.
2020-11-28 11:53: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
7e728b1261 Add build_arch.sh script 2020-11-28 10:07:02 -07:00
Anders Pitman
35874f7df0 Update builds to use CGO_ENABLED=0
Particularly useful for Android, since it avoids having to acquire
an Android NDK compiler.
2020-11-27 22:17:32 -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
738a637385 Change server to only manage server certs
Before it was getting certs for all tunnels, even if they were
set as client or passthrough TlsTermination.
2020-11-27 21:24:48 -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
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
78ca1fc1f8 Allow SSH server port to be configured at runtime 2020-11-26 20:13:50 -07:00
Anders Pitman
b824498e4c Merge remote-tracking branch 'origin/master' 2020-11-26 19:52:20 -07:00
Anders Pitman
6652b76d04 Don't intercept /api requests 2020-11-26 19:51:50 -07:00
Anders Pitman
038eb80358
Update README.md 2020-11-25 18:42:40 -07:00
Anders Pitman
7f45316928 Update todo 2020-11-24 19:21:59 -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
4b4dc94222 Add android builds
Client seems to be working when run manually with adb shell from
/data/local/tmp/ on a Moto G Power. Server fails when trying to
write /.local for the certs.
2020-11-20 18:29:12 -07:00
Anders Pitman
28254816f1 Add 32-bit builds 2020-11-10 00:26:14 -07:00
Anders Pitman
0097899289 Remove old script call 2020-11-04 09:29:36 -07:00
Anders Pitman
1c40e1083c Fix logo embedding 2020-11-04 09:28:10 -07:00