fanqiang
v2.6.0
Published
Tunnel Proxy Auto Deployment
Downloads
8
Readme
Tunnel Proxy Auto Deployment - fanqiang
This project creates a command line tool that helps to automatically deploy a shadowsocks proxy on an AWS lightsail instance.
Prerequisites
- Has Nodejs installed on local machine. See download link for more details.
- Has Terraform installed on local machine. See Install Terraform for more details.
- Has an AWS access token. See manage AWS access token for more details.
- Has an Aliyun access token. See Aliyun Account for more details
Installation
npm install --global fanqiang
Command Usage
# fanqiang <command> [options]
Commands:
create Create new tunnel proxy infrastructures
destroy Destroy tunnel proxy infrastructures
Options:
--region AWS lightsail region for proxy deployment
[string] [default: "us-east-1"]
--tunnel-region Aliyun region for tunnel deployment
[string] [default: "cn-shanghai"]
--bucket AWS S3 bucket name, used to store clash client configuration file
[string] [default: "fanqiang-$USER"]
--aws-credentials Must be in format: <ACCESS_KEY_ID>:<ACCESS_KEY_SECRET>
[string]
--aliyun-credentials Must be in format: <ACCESS_KEY_ID>:<ACCESS_KEY_SECRET>
[string]
--public-key SSH public key for login proxy or tunnel server
[string]
--help Show help [boolean]
--version Show version number [boolean]
Setup Credentials for AWS Services
You need to configure an AWS IAM user on the local machine before running any command listed above. So far, this tool supports reading AWS credentials from Shared Credentials File:
- The shared credentials file on Linux, Unix, and macOS: ~/.aws/credentials
- The shared credentials file on Windows: C:\Users\USER_NAME\.aws\credentials
An example of credentials file:
[default]
aws_access_key_id = <YOUR_ACCESS_KEY_ID>
aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>
Refer to AWS SDK documentation for more details on how to set up an AWS credentials file.
Setup Credentials for Aliyun Services
You need to configure an Aliyun RAM user on a local machine if you want to use --tunnel-region option. So far, this tool supports reading credentials from $HOME/.alibabacloud/credentials:
- The credentials file on Linux, Unix, and macOS: ~/.alibabacloud/credentials
- The credentials file on Windows: C:\Users\USER_NAME\.alibabacloud\credentials
An example of credentials file:
[default]
enable = true
type = access_key
access_key_id = <YOUR_ACCESS_KEY_ID>
access_key_secret = <YOUR_ACCESS_KEY_SECRET>
Refer to Aliyun SDK documentation for more details on how to set up an Aliyun credentials file.