Skip to main content

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)

Project description

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.

  1. 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
    
  2. Accept the new profile on the iOS device.

  3. Allow the installed certificate under Settings > General > About > Certificate Trust Settings

  4. 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
    
  5. 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 "************"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appletun-0.0.2.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

AppleTun-0.0.2-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file appletun-0.0.2.tar.gz.

File metadata

  • Download URL: appletun-0.0.2.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for appletun-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4dea8147bb5c0597358c1b9164f3ea947738bb36d2f084b3174a6baca8e8f81a
MD5 f7597f037d1ab25bb0a4c82f68b6a73c
BLAKE2b-256 77414970979f24ca1aa9a0117fb329925762420da2be117d70a97ae51c5c0a6d

See more details on using hashes here.

File details

Details for the file AppleTun-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: AppleTun-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for AppleTun-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 be8143bb12e7f72edbbc3b40831d1fff24b7fa611cf591d585dfc939dd1c9263
MD5 862af73b8a89fc5a722bdc87a53f2807
BLAKE2b-256 60d13c7a87e27e5ef28e1e919a3b8c1fa5ab34b59c5929a844af51bd5538f6c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page