MCPcopy Index your code
hub / github.com/Anton2319/VPNoverSSH

github.com/Anton2319/VPNoverSSH @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
136 symbols 303 edges 18 files 2 documented · 1% updated 21mo agov1.0-release · 2024-09-19★ 525 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

VPN over SSH

What is it?

VPN over SSH is a systemwide proxy for Android which utilizes VPN Service API. It allows you to tunnel your traffic through SSH tunnel between your server and your client device. Essentially, this is the alternative of doing a dynamic port forward via openssh cli client: ssh user@hostname -D 1080. No additional server setup is needed.

How does it work?

Server

Server (which is typically a Linux or Unix machine) runs OpenSSH, which has the port forwarding capability built-in.

Client

The application first establishes a connection with a remote server using connectbot sshlib, and sets up a dynamic port forward and a localhost socks5 server on port 1080.

Then, using tun2socks library as socks5 client, it captures all system traffic and sends it to the localhost proxy server.

Limitations

Lack of UDP support

With no additional server setup, this app cannot tunnel any UDP traffic, which makes it useless for everyday web browsing because services such as YouTube, Twitch, Netflix, and other streaming platforms will not work, as well as many multiplayer games, and other services that rely on UDP to deliver its content.

Low speed

OpenSSH uses strong encryption, TCP protocol, and typically runs in userspace, all of which dramaticaly slows down your connection. Expect around 10x slowdown.

Core symbols most depended-on inside this repo

getInstance
called by 14
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/StatusInfo.java
getInstance
called by 7
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/PortForward.java
ipATON
called by 7
app/src/main/java/ru/anton2319/vpnoverssh/services/SocksProxyService.java
getPackageName
called by 6
app/src/main/java/ru/anton2319/vpnoverssh/data/AppInfo.java
ipNTOA
called by 6
app/src/main/java/ru/anton2319/vpnoverssh/services/SocksProxyService.java
setActive
called by 5
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/StatusInfo.java
getServerIP
called by 4
app/src/main/java/ru/anton2319/vpnoverssh/data/SSHConnectionProfile.java
getServerPort
called by 4
app/src/main/java/ru/anton2319/vpnoverssh/data/SSHConnectionProfile.java

Shape

Method 112
Class 23
Enum 1

Languages

Java100%

Modules by API surface

app/src/main/java/ru/anton2319/vpnoverssh/SettingsActivity.java20 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/SSHConnectionProfile.java16 symbols
app/src/main/java/ru/anton2319/vpnoverssh/services/SocksProxyService.java13 symbols
app/src/main/java/ru/anton2319/vpnoverssh/MainActivity.java11 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/utils/AppInfoAdapter.java9 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/StatusInfo.java9 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/PortForward.java9 symbols
app/src/main/java/ru/anton2319/vpnoverssh/NewConnectionActivity.java8 symbols
app/src/main/java/ru/anton2319/vpnoverssh/services/SshService.java7 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/utils/SSHConnectionProfileManager.java7 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/singleton/SocksPersistent.java7 symbols
app/src/main/java/ru/anton2319/vpnoverssh/data/AppInfo.java5 symbols

For agents

$ claude mcp add VPNoverSSH \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact