AppleTun
Description
A utility for creating and connecting to a local VPN for iOS devices allowing HTTP proxy without device supervision for all connections (not limited to Wi-Fi)
Requirements
StrongSwan installation is required.
Installation of StrongSwan can be done via brew install strongswan, any other package manager,
or a manual build (incase special flags are required, exporting of session keys to files for example).
Installation
python3 -m pip install -U AppleTun
Usage
Usage: appletun [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
install-profile Install AppleTun VPN profile (override if already exists)
remove-profile Remove AppleTun VPN profile
start Start AppleTun VPN
stop Stop AppleTun VPN
Example
In this example, a VPN profile is installed together with Proxyman certificate for use with the http proxy.
-
Install a profile with Proxyman certificate:
➜ appletun git:(master) ✗ appletun install-profile -C proxyman-ca.pem Profile installed, please accept installation on device Please allow installed certificate under Settings > General > About > Certificate Trust Settings
-
Accept the new profile on the iOS device.
-
Allow the installed certificate under
Settings > General > About > Certificate Trust Settings -
Start the VPN server:
➜ appletun git:(master) ✗ appletun start installed profile: AppleTunVPN PSK ************ HTTP 192.168.1.2:9090 VPN Running Please activate VPN connection on Client device
-
Connect to the VPN from the device.
Inner implementation details
The generated ipsec.conf configuration from the Example would look as follows:
conn AppleTun
left=0.0.0.0 # Server listens on any IPv4 address
leftid=AppleTun # Identity presented by the server
leftsubnet=0.0.0.0/0,::/0 # Server-side networks (IPv4 and IPv6)
leftauth=psk # Server uses a pre-shared key
right=%any # Accept any client IP
rightid=%any # Accept any client identity
rightdns=%config4,%config6 # Push DNS settings (IPv4, IPv6)
rightsubnet=%dynamic # Dynamically assign subnets to clients
rightsourceip=133.33.37.0/24,fec3:1337::0/112 # IPv4/IPv6 pool for clients
rightauth=psk # Client also uses a pre-shared key
ike=aes256-sha256-ecp256,aes256-sha256-modp2048! # Phase 1 proposals
esp=aes256-sha256-ecp256,aes256-sha256-modp2048! # Phase 2 proposals
keyexchange=ikev2 # Use IKEv2 protocol
auto=add # Load connection at startup
While the following line would be added to ipsec.secrets:
AppleTun : PSK "************"
Metadata
Release files for AppleTun 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| appletun-0.0.6.tar.gz | 48.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| appletun-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.2 kB
Release files / appletun-0.0.6.tar.gz
| Download URL | appletun-0.0.6.tar.gz |
|---|---|
| Size | 48.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bae4269f6c130983f5baf46072c3c7dc92220653c2726b54045098d30a472fbe
|
|
BLAKE2b-256 checksum How to use checksums |
440220952ac0f6af80893489631d971e41ab9b25c2886311b977cba79fb900b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / appletun-0.0.6-py3-none-any.whl
| Download URL | appletun-0.0.6-py3-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39cbb07410e32898b62bf2d9534fb2638a5298d34f394567022979a97613909b
|
|
BLAKE2b-256 checksum How to use checksums |
cb8fc61fedf5366ba3d20908a12b14b5769d38cafedf4442fcc88fb9a4613ac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|