Commit Graph

174 Commits

Author SHA1 Message Date
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
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
Anders Pitman
07dd46047d Create Dockerfile for building releases 2020-11-04 09:05:08 -07:00
Anders Pitman
6b36c256c3 Overhaul build scripts
* Moved scripts into separate directory.
* Can now do a release build with a single command.
* Automatically create release tarball.
2020-11-04 08:37:00 -07:00
Anders Pitman
3258cd5ec7
Merge pull request #12 from boringproxy/add-license-1
Create LICENSE
2020-11-04 07:56:17 -07:00
Anders Pitman
c5e3f65ce4
Create LICENSE 2020-11-04 07:55:43 -07:00
Anders Pitman
b7579f9a4e Update todo 2020-11-03 14:09:11 -07:00
Anders Pitman
c7efb826ae Fix Jellyfin
Services like Jellyfin weren't working apparently because the upstream
requests were using chunked encoding. Reading the entire request body
and forwarding it on seems to fix it.

Also overriding the Host header for upstream requests.
2020-11-03 10:24:41 -07:00
Anders Pitman
ada81bae62
Merge pull request #1 from fbartels/docker
Use multi stage dockerfile for building
2020-10-31 20:54:54 -06:00
Felix Bartels
eacc0094aa Use multi stage dockerfile for building
This also adds a docker-compose.yml for easy running and rebuilding

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-10-31 19:11:11 -04:00
Anders Pitman
e93fc79f23 Add build and run instructions to readme 2020-10-31 15:13:09 -06:00
Anders Pitman
a7d1edcdbf Update go.sum 2020-10-31 09:52:14 -06:00
Anders Pitman
bb7e991515 Add Dockerfile 2020-10-30 19:55:33 -06:00
Anders Pitman
2c1bc2d001 Use curl to install go 2020-10-30 19:36:27 -06:00
Anders Pitman
98a6ff52fc Delete tokens when user is deleted
Also added DeleteUser to API
2020-10-30 18:50:24 -06:00
Anders Pitman
27aeb57336 Clean up api code organization 2020-10-30 18:38:57 -06:00
Anders Pitman
d0f3ab89db Output login link on first start 2020-10-29 18:49:59 -06:00
Anders Pitman
4f967ea4ef Add build script 2020-10-29 18:01:41 -06:00
Anders Pitman
6b9f9aa413 Implement creating users and tokens from REST API 2020-10-29 17:56:38 -06:00
Anders Pitman
eb9409566d Make go script executable 2020-10-29 17:40:46 -06:00
Anders Pitman
51d1bd09e0 Add script for installing golang 2020-10-29 17:40:07 -06:00
Anders Pitman
4f09c7ada1 Pass through upstream redirects 2020-10-29 13:03:35 -06:00
Anders Pitman
0f3482f836 Reorder todo 2020-10-28 12:59:40 -06:00
Anders Pitman
444ab10260 Remove config
Only admin-domain CLI parameter now required for running server.
2020-10-27 15:47:17 -06:00
Anders Pitman
4fd830167f Fix more security holes 2020-10-27 15:21:56 -06:00
Anders Pitman
3a705cf252 Fix QR codes not rendering for admin 2020-10-27 14:51:59 -06:00
Anders Pitman
51dce1876d Fix token delete security bug 2020-10-27 14:48:22 -06:00