Skip to content

ghdwlsgur/outline-vpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

govpn-logo

Outline-VPN

It can help you quickly provision a Shadowsocks-based VPN server on an AWS EC2 instance and assist you in using Outline VPN to use the VPN.


GitHub tag (latest SemVer) Go Report Card Codacy Badge Maintainability circle ci

Overview

Once the user selects a machine image, instance type, region, and availability zone, an EC2 instance is created in the default subnet within the selected availability zone in the default VPC. If you don't have a default VPC or default subnet, we can assist you in creating them. You can create one EC2 instance per region. To use the VPN service, simply paste the access key into the Outline Client App.

🀝 Join Telegram Outline Channel

Outline is a Shadowsocks-based proxy created by Google. It lets you create and manage Shadowsocks servers easily. Outline clients are also well-designed applications available for all platforms.

It usually works as below.

[Outline client] <-> [Outline server] <-> [Internet]

Security

After creating the VPN server, the UDP and TCP ports of the security group are configured to allow access only from the public IP of the user who owns the VPN server to access the VPN service.

Prerequisite

Provisioning speed may vary depending on instance type.

EC2

  • [required] ec2:CreateDefaultVpc, ec2:DescribeVpcs, ec2:DeleteVpc
  • [required] ec2:CreateDefaultSubnet, ec2:DescribeSubnets, ec2:DeleteSubnet
  • [required] ec2:DeleteInternetGateway, ec2:DescribeInternetGateways, ec2:DetachInternetGateway
  • [required] ec2:CreateTags, ec2:DescribeInstances, ec2:DescribeInstanceTypeOfferings, ec2:DescribeAvailabilityZones, ec2:DescribeImages, ec2:DescribeRegions

Client

  • [required] AWS Configure

    Execute command that aws configure

    $ aws configure
    AWS Access Key ID :
    AWS Secret Access Key :
    Default region name :
    Default output format :
  • [optional] ~/.aws/credentials or ~/.aws/credentials_temporary

Library / Program

  • [required] jq

    brew install jq
  • [required] rsync

    brew install rsync
  • [required] terraform

    # install
    brew tap hashicorp/tap
    brew install hashicorp/tap/terraform
    
    # upgrade
    brew upgrade hashicorp/tap/terraform
  • [required] Outline Client (VPN connection purpose)

Result

example region: us-east-1

  • [optional tag: govpn-vpc] default vpc
  • [optional tag: govpn-subnet] default subnet
  • [required tag: govpn-ec2-us-east-1] EC2
  • [required tag: govpn_us-east-1] Key Pair and Pem file (.ssh/govpn_us-east-1.pem)
  • [required tag: govpn-sg-us-east-1] Security Group

All the resources you create can be tracked with the tag function provided by AWS. This thoroughly avoids unexpected cost of resources.

Installation

Homebrew

# [install]

brew tap ghdwlsgur/outline-vpn
brew install outline-vpn

# [upgrade]

brew upgrade outline-vpn

How to use (command)

apply

Create a VPN server

$ outline-vpn apply

# Provision EC2 in the us-east-1 region.
$ outline-vpn apply -r us-east-1

# Provision EC2 in the ap-northeast-2 region.
$ outline-vpn apply -r ap-northeast-2

asciicast

After executing the outline-vpn create command, register the received access key on the Outline Client App and connect.

destroy

Delete a VPN server

$ outline-vpn destroy

# Terminate EC2 in the us-east-1 region.
$ outline-vpn destroy -r us-east-1

# Terminate EC2 in the ap-northeast-2 region.
$ outline-vpn destroy -r ap-northeast-2

asciicast

find

Find instances created using the outlinevpn CLI tool.

$ outline-vpn find

asciicast

Trouble Shooting

while executing terraform init you might face the below error if you are working in a MAC with apple chip in it.

image

brew install kreuzwerker/taps/m1-terraform-provider-helper
m1-terraform-provider-helper activate
m1-terraform-provider-helper install hashicorp/template -v v2.2.0

License

Outline-VPN is licensed under the MIT

About

πŸš€ A CLI tool that automatically creates the Outline VPN server on the AWS instance using Terraform

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages