Git Product home page Git Product logo

sshvpn's Introduction

SSHVPN

GitHub Workflow Go Version Go Report GitHub License Releases

中文 | English

A safety virtual personal network over SSH and Gvisor

Content

  1. QuickStart
  2. Functions
  3. Architecture

QuickStart

Install server(On ssh server)

SSH login to your ssh server

Download sshvpn binary

curl -Lo sshvpn.zip https://github.com/wencaiwulue/sshvpn/releases/download/v1.0.0/sshvpn_v1.0.0_linux_amd64.zip && unzip -d sshvpn sshvpn.zip && mv ./sshvpn/bin/sshvpn /usr/local/bin

Run server

nohup sshvpn server &

Install client(On local computer)

Download from GitHub release release

➜  sshvpn version
SSHVPN: CLI
    Version: v1.0.0
    Branch: HEAD
    Git commit: 459082458113b828a5d73c718be42631699b44b2
    Built time: 2024-02-19 15:25:26
    Built OS/Arch: linux/amd64
    Built Go version: go1.21.7

Functions

Connect to remote ssh server network

~ sshvpn client --ssh-addr xxx.xxx.xxx.xxx:22 --ssh-username root --ssh-password xxx
DEBU[0000] [sudo --preserve-env sshvpn client --ssh-addr xxx.xxx.xxx.xxx:22 --ssh-username root --ssh-password xxx]
DEBU[0001] [tun] ifconfig utun9 inet 223.253.0.1/32 223.253.0.1 mtu 1500 up
DEBU[0001] [tun] ifconfig utun9 inet6 ::1 prefixlen 128 alias
DEBU[0001] [tun] route add -net xxx.xxx.xxx.xxx/32 -interface utun9
DEBU[0001] [tun] route add -net xxx.xxx.xxx.xxx/32 -interface utun9
DEBU[0001] [tun] 223.253.0.1: name: utun9, mtu: 1500, addrs: [223.253.0.1/32 fe80::bed0:74ff:fe4c:9790/64 ::1/128]
DEBU[0001] networksetup -getdnsservers Wi-Fi
DEBU[0001] networksetup -setdnsservers Wi-Fi xxx.xxx.xxx.xxx
INFO[0001] you can use VPN now~
DEBU[0001] [TUN-RAW] IP-Protocol: IPv6HopByHop, SRC: fe80::bed0:74ff:fe4c:9790, DST: ff02::16, Length: 96
DEBU[0001] [TUN-RAW] IP-Protocol: IPv6HopByHop, SRC: fe80::bed0:74ff:fe4c:9790, DST: ff02::16, Length: 76
DEBU[0001] [TUN-UDP] Debug: LocalPort: 53, LocalAddress: xxx.xxx.xxx.xxx, RemotePort: 60605, RemoteAddress 223.253.0.1
DEBU[0001] [TUN-UDP] IP-Protocol: UDP, SRC: 223.253.0.1, DST: xxx.xxx.xxx.xxx, Length: 85
DEBU[0001] [TUN-UDP] Debug: LocalPort: 53, LocalAddress: xxx.xxx.xxx.xxx, RemotePort: 54483, RemoteAddress 223.253.0.1
...

Leave this terminal alone

~ curl www.google.com -L
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en-SG"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="KGbHmdii_0HKvWBmaQ_OAQ">...

Open local PC browser to visit web via SSH server network

Multiple Protocol

  • TCP
  • UDP

Cross-platform

  • macOS
  • Linux
  • Windows

Architecture

Architecture can be found here.

sshvpn's People

Contributors

wencaiwulue avatar

Stargazers

x-itg avatar I Putu Ariyasa avatar  avatar  avatar  avatar  avatar along avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.