Skip to content
@TerrorTunnels

TerrorTunnels

Personal Cloud VPN with API control on your iPhone

Personal VPN Control System

A complete solution for deploying and managing a personal VPN service using AWS, created during a sabbatical in Taipei. The project demonstrates the potential of AI-assisted development, with nearly all code generated using ChatGPT and Claude.

Note: Complete chat transcripts creating this project are included

System Architecture

graph TB
    subgraph iPhone["iPhone"]
        App["VPN Control App"]
        Keychain["`Keychain
        (API Key Storage)`"]
    end

    subgraph AWS["AWS Cloud"]
        subgraph API["API Layer"]
            APIG["API Gateway"]
                subgraph APIK["Authorization"]
                    APIKey["API Key"]
                end
            Lambda["Lambda Function"]
        end
        
        subgraph VPC["VPC (10.0.0.0/16)"]
            subgraph PublicSubnet["Public Subnet (10.0.1.0/24)"]
                EC2["`EC2 Instance 
                (OpenVPN Server)`"]
                EIP["Elastic IP"]
            end
            IGW["Internet Gateway"]
            SG["`Security Group 
            - UDP 1194 (VPN) 
            - TCP 22 (SSH)`"]
        end
        
        subgraph IAM["IAM"]
            Role["Lambda IAM Role"]
        end
    end

    subgraph Internet["Internet"]
        Client["VPN Client"]
    end

    %% App connections
    App -->|"HTTPS API Requests"| APIG
    App <-->|"Store/Retrieve"| Keychain

    %% API Layer connections
    APIG -->|"Validate"| APIK
    APIG -->|"Invoke"| Lambda
    Lambda -->|"Start/Stop/Status"| EC2
    Lambda <-->|"Assume"| Role

    %% VPC connections
    EC2 <-->|"Attach"| EIP
    EC2 -->|"Use"| SG
    PublicSubnet -->|"Route"| IGW
    IGW -->|"Internet Access"| Internet

    %% Client connections
    Client <-->|"VPN Traffic UDP 1194"| EIP

    %% Styles
    classDef aws fill:#FF9900,stroke:#232F3E,color:black;
    classDef service fill:#7AA116,stroke:#232F3E,color:black;
    classDef network fill:#3F8624,stroke:#232F3E,color:white;
    classDef security fill:#DD344C,stroke:#232F3E,color:white;
    classDef client fill:#3B48CC,stroke:#232F3E,color:white;

    class AWS aws;
    class APIG,Lambda,EC2,EIP service;
    class VPC,PublicSubnet,IGW network;
    class SG,Role,APIKey,Keychain security;
    class App,Client client;
Loading

Components

This project consists of three main components, each in its own repository:

Infrastructure as Code for the VPN server:

  • AWS VPC and networking
  • EC2 instance with OpenVPN
  • Security groups and access controls
  • Terraform configuration

Serverless control interface:

  • AWS API Gateway
  • Lambda function
  • EC2 instance management
  • Security and monitoring

iOS mobile application:

  • SwiftUI-based interface
  • Real-time status monitoring
  • Secure API key storage
  • Start/Stop controls

Quick Start

  1. Deploy Infrastructure:
git clone git@github.com:TerrorTunnels/vpn-infra-tf.git
cd vpn-infra-tf
# Follow README instructions
  1. Set up API:
git clone git@github.com:TerrorTunnels/vpn-control-api.git
cd vpn-control-api
# Follow README instructions
  1. Configure iOS App:
git clone git@github.com:TerrorTunnels/VPNControl-ios.git
cd vpncontrol-ios
# Follow README instructions

Development

Each repository contains detailed setup instructions and documentation. The typical workflow is:

  1. Deploy infrastructure using Terraform
  2. Configure API Gateway and Lambda function
  3. Build and deploy iOS app
  4. Configure app with API endpoint and key

Contributing

Contributions are welcome to any of the repositories! Please read the individual contribution guidelines in each repository.

Project Status

  • ✅ Infrastructure: Production-ready
  • ✅ API: Production-ready
  • ✅ iOS App: Production-ready

License

All repositories are licensed under the MIT License.

Acknowledgments

Contact

For questions or suggestions, please open an issue in the relevant repository.

Popular repositories Loading

  1. vpn-infra-tf vpn-infra-tf Public

    Forked from rjamestaylor/vpn-infra-tf

    AWS hosted OpenVPN server

    HCL 1

  2. .github .github Public

    Personal Cloud VPN with API control on your iPhone

    Swift

  3. VPNControl-ios VPNControl-ios Public

    Forked from rjamestaylor/VPNControl-ios

    iOS App using the VPN Control API of TerrorTunnels

    Swift

  4. vpn-control-api vpn-control-api Public

    Forked from rjamestaylor/vpn-control-api

    AWS-based serverless API for controling TerrorTunnels VPN

    Python

Repositories

Showing 4 of 4 repositories
  • .github Public

    Personal Cloud VPN with API control on your iPhone

    Swift 0 MIT 0 0 0 Updated Mar 18, 2025
  • VPNControl-ios Public Forked from rjamestaylor/VPNControl-ios

    iOS App using the VPN Control API of TerrorTunnels

    Swift 0 MIT 1 0 0 Updated Feb 19, 2025
  • vpn-control-api Public Forked from rjamestaylor/vpn-control-api

    AWS-based serverless API for controling TerrorTunnels VPN

    Python 0 MIT 1 0 0 Updated Feb 18, 2025
  • vpn-infra-tf Public Forked from rjamestaylor/vpn-infra-tf

    AWS hosted OpenVPN server

    HCL 1 MIT 1 0 0 Updated Feb 18, 2025

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…