-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple HTTP -> TLS Configuration #2
Comments
If I understand you correctly, you have Box A that needs to access a public web service; and the public web service runs TLS 1.2. If so, then yes, you can do this with go-tunnel; here's a fragment of the config file:
With the above config - you should be able to connect to 127.0.0.1:9090 and gotun will transparently bridge the packets to a TLS backed connection to your public web service. Lastly, "bind" is useful when your box has multiple outbound IP addresses and you want to use a specific outgoing IP address. For most users, this option is NOT needed at all. |
Thanks for the quick reply. Is the CA required for a public website? Say I’m hitting the GitHub API with a bearer token. That wouldn’t require any certificate exchange, right? |
Would including this as the tls -> ca work? |
I got it to work. Turns out, we have a corporate certificate bundle. Now I am seeing things like this in our logs.
|
That is normal. When one end of the socket closes connection, the end that is reading (i.e., server.go) gets "zero bytes" and in golang, EOF is also set. Here is a full config file I just tested with; it acts as a HTTP proxy to git.kernel.org:
And this is how I downloaded via this proxy:
You can see it downloads via the gotun instance. In the end, gotun prints # of bytes transfered via the proxy:
|
I think I understand, thanks. I was getting confused because the last test we ran showed these same lines over and over again, and the client never seemed to get a reply. This was using a PHP SOAP library.
|
Pls check if your service does a redirect to a different server/URL. My first try with www.kernel.org confused me because of the HTTP 3xx redirect. After I put the exact new URL in the wget invocation, I was able to go directly to the destination server via gotunnel. |
I don't see any redirects. Just multiple attempts to retry before it works. |
do you have any logs or other details to help narrow down the "retries"? |
Just what I sent you a few days ago. It's those few lines repeated. |
Could you try the latest version (0.4.3) and see if it produces the retries? |
I don't think I was able to do so, because I'm on RHEL 5. I had to build an older version with a special version of Go. It was actually quite painful just getting to this point. If you have a way to get the latest built and working on RHEL 5, I'd love to speak more. |
If there is any possibility of continuing this conversation privately, I'd welcome it. My Twitter handle is also @walkingriver |
So, #1: if you are on any linux system and type make on the top-dir of this repo, it will by default build a statically linked executable. You can move this static binary to any linux platform - in theory it should work; assuming of course there is no issue with the syscalls used by the go runtime. I don't have access to any RHEL system. Looking at the golang discussion: golang/go#4989 seems conclusive :-( #2. I don't use twitter or any social media; happy to chat privately - sw@herle.net |
I'm wondering whether I could use go-tunnel to provide an on-box proxy to an existing public web service, which is TLS 1.2 only? How would that configuration look? If it's a public service, such as Netflix or Google, I wouldn't need any special certs, right? Thanks!
Is there any additional documentation on the configuration file? What is the
bind
property used for? No matter what I set it to, it doesn't seem to accept it.The text was updated successfully, but these errors were encountered: