artyom / tlstun Goto Github PK
View Code? Open in Web Editor NEWBasic socks5 over TLS proxy
Home Page: https://pkg.go.dev/github.com/artyom/tlstun/v2
License: MIT License
Basic socks5 over TLS proxy
Home Page: https://pkg.go.dev/github.com/artyom/tlstun/v2
License: MIT License
Command tlstun implements basic VPN over TLS (both client and server). Client part is expected to be run locally and used by local services as a socks5 proxy. Client establishes TLS session to the server running on some remote host that performs outgoing requests on behalf of requests made to the client. Client and server authenticate each other with certificates which can be created with openssl or https://github.com/artyom/gencert Usage example Generate server and client side certificates, they can be signed by the same CA and saved using PEM encoding into a single file. Certificate keys should also be saved as a separate PEM-encoded files. With gencert tool from https://github.com/artyom/gencert this can be done as: gencert -hosts my.domain.tld This produces five files in the current directory: client certificate + key pair, another pair for the server and a certificate authority certificate. Note that my.domain.tld should point to the host you plan running server part of tlstun. Now configure tlstun to run on the server that could be reached at my.domain.tld like this: tlstun server -addr=:9000 -ca=ca.pem \ -cert=server-cert.pem -key=server-key.pem The client part is expected to be running locally (on a laptop/workstation, etc.): tlstun client -addr=127.0.0.1:1080 -ca=ca.pem \ -cert=client-cert.pem -key=client-key.pem \ my.domain.tld:9000 Client is now listening on localhost port 1080 and local software can be configured to use this endpoint as a socks5 proxy. Client may be configured to work with multiple servers: tlstun client -addr=127.0.0.1:1080 -ca=ca.pem \ -cert=client-cert.pem -key=client-key.pem \ my.domain.tld:9000 other.domain.tld:9000 By default client will periodically evaluate all endpoints and prefer one which replies first. This check may be disabled with -no-check flag. Instead of listing endpoints directly, client may discover them from SRV DNS records. If -discover=domain.tld flag is set, client ignores any endpoints given on the command line and instead looks up SRV record _tlstun._tcp.domain.tld, which must follow standard format to specify host/port pairs. HTTPS compatible mode Server may be configured to automatically issue certificate from ACME provider (currently is's Let's Encrypt). For this to work, server must be exposed over port 443 and it also doubles as an https endpoint. By default it replies with 404 Not Found, but can optionally be configured to serve static files from file system directory: tlstun server -addr=:443 -ca=ca.pem -acme \ -acme-domain=domain.tld [email protected] \ -acme-cache=/var/cache/acme \ -httproot=/var/www/domain.tld Server may also be run with -dns-tls flag, which enables resolving via DNS-over-TLS providers (currently Cloudflare and Quad9).
Any chance for the tlstun client to support SSL VPN server?
Just like https://www.vpngate.net/en/ posting public SSL VPN server nodes.
Sample cli will be "tlstun client -addr=127.0.0.1:1080 public-vpn-37.opengw.net:443".
Thank you!
The information sent through the proxy can be decrypted by the proxy?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.