Skip to content

Repository files navigation

SSH Proxy VPN

An Android VPN application that creates a secure VPN tunnel through SSH servers. The app connects directly to the VPN interface without requiring a separate account or login system.

SSH server profiles can be managed remotely through a simple JSON endpoint, making it easy to maintain and distribute a list of available servers.

Features

  • 🔐 SSH-based VPN tunnel
  • 👤 Username and password fields directly in the main screen
  • 🚫 No login or account required
  • 📡 Remote JSON server configuration
  • 💾 Local caching of server profiles
  • ⚙️ Configurable DNS and MTU
  • 📱 Android VPN Service integration
  • ⚙️ Per-App Routing
  • 🔄 Easy server switching
  • 🛠️ Built with Kotlin and Jetpack Compose

How It Works

The application establishes an SSH connection to the selected server and routes VPN traffic through the SSH tunnel.

The basic flow is:

Android Device
      │
      │ VPN traffic
      ▼
SSH Proxy VPN
      │
      │ SSH connection
      ▼
Remote SSH Server
      │
      ▼
Internet

No application account or central authentication server is required.

Server Profiles

Server information can be hosted on any HTTP/HTTPS endpoint that returns JSON.

Configure the profile URL from:

Settings → Profiles JSON

Example:

[
  {
    "id": "de-frankfurt-1",
    "name": "Frankfurt 1",
    "location": "Germany",
    "address": "ssh1.example.com",
    "port": 22,
    "dns": "1.1.1.1",
    "mtu": 1500
  },
  {
    "id": "nl-amsterdam-1",
    "name": "Amsterdam 1",
    "location": "Netherlands",
    "address": "ssh2.example.com",
    "port": 22,
    "dns": "1.1.1.1",
    "mtu": 1500
  }
]

The application also accepts:

{
  "servers": [
    {
      "name": "Frankfurt 1",
      "location": "Germany",
      "address": "ssh1.example.com",
      "port": 22
    }
  ]
}

The following top-level containers are supported:

  • servers
  • profiles
  • data
  • A direct JSON array

Alternative Field Names

For compatibility, the following fields can also be used:

address  → host
port     → sshPort

For example:

{
  "name": "Frankfurt",
  "location": "Germany",
  "host": "ssh.example.com",
  "sshPort": 22
}

SSH Credentials

SSH credentials are entered directly in the application's main VPN screen.

Username

The SSH account username on the selected server.

Example:

root

or:

vpnuser

Password

The password associated with the SSH account.

The credentials are applied to the currently selected server profile when the VPN connection is started.

For production deployments, dedicated restricted SSH accounts are recommended instead of using a root account.

Default Profile URL

The application has a default profile URL configured in:

ServerProfilesApi.DEFAULT_URL

Replace the example URL with your own server list:

https://example.com/ssh-servers.json

Alternatively, users can change the profile URL from the application's Settings screen.

Project Structure

The project is an Android application written primarily in Kotlin.

Main components include:

app/
├── src/
│   └── main/
│       ├── java/
│       └── res/
├── build.gradle.kts
└── proguard-rules.pro

server-servers.example.json
README.md
build.gradle.kts
settings.gradle.kts

The application uses Android's VPN service infrastructure together with the project's SSH networking implementation.

Building

Clone the repository:

git clone https://github.com/YOUR_USERNAME/SshProxyVpn.git
cd SshProxyVpn

Open the project in Android Studio and allow Gradle to synchronize the project.

Then build the application:

./gradlew assembleDebug

On Windows:

gradlew.bat assembleDebug

The generated APK will normally be located under:

app/build/outputs/apk/debug/

Configuration

Before distributing the application, configure your production server-profile endpoint.

For example:

const val DEFAULT_URL = "https://your-domain.com/ssh-servers.json"

Your endpoint should return valid JSON over HTTPS.

Example Server Endpoint

A simple static file is enough.

For example:

https://vpn.example.com/ssh-servers.json

Contents:

[
  {
    "id": "us-new-york",
    "name": "New York",
    "location": "United States",
    "address": "nyc01.example.com",
    "port": 22,
    "dns": "1.1.1.1",
    "mtu": 1500
  },
  {
    "id": "de-frankfurt",
    "name": "Frankfurt",
    "location": "Germany",
    "address": "fra01.example.com",
    "port": 22,
    "dns": "1.1.1.1",
    "mtu": 1500
  }
]

❤️ Support the Project

If you find this project useful, consider supporting its development. Your donations help improve the project, add new features, and maintain long-term development.

Cryptocurrency Donations

EVM Networks (Ethereum, BNB Smart Chain, Polygon, Arbitrum, Base, Optimism, Avalanche C-Chain, etc.)

USDT / USDC

qr-code

0x971bf6aBa6Cd0b745b005F2866d4a42cAcAd390C

Thank you for supporting the project! ❤️

Disclaimer

This project is provided for educational, development, and legitimate networking purposes.

You are responsible for ensuring that your use of the application, SSH servers, VPN traffic, and hosted infrastructure complies with applicable laws, regulations, network policies, and the terms of service of the networks and services you use.

License

MIT

About

An Android VPN application that creates a secure VPN tunnel through SSH servers. The app connects directly to the VPN interface without requiring a separate account or login system. SSH server profiles can be managed remotely through a simple JSON endpoint, making it easy to maintain and distribute a list of available servers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages