Skip to content

A tool to automatically generate and upload Shadowsocks or Clash subscription URLs from Shadowsocks URLs.

Notifications You must be signed in to change notification settings

lzwjava/auto-ss-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto SS Config

A tool to automatically generate and upload Shadowsocks or Clash subscription URLs from Shadowsocks URLs. Whenever my Shadowsocks server is blocked, I use Outline Manager to create a new server and obtain a fresh address. I then import this URL directly using the Mac app to bypass the Great Firewall (GFW) restrictions. Next, I run python upload/upload_configs.py from this project to update my subscription URLs. Finally, I sync my Android and iOS devices with the updated subscription URL to ensure all my digital devices maintain functional network connections.

Features

  • Converts Shadowsocks URLs to Clash configuration
  • Supports multiple Shadowsocks servers
  • Automatically uploads configurations to Google Cloud Storage
  • Makes configurations publicly accessible
  • Uses cache control for immediate updates

Files

  • app_config_tmp.yaml - Application configuration (bucket name, SS URLs)
  • clash_config_tmp.yaml - Temporary Clash configuration file
  • upload/upload_configs.py - Script to generate Clash config and upload configs to Google Cloud Storage
  • requirements.txt - Python dependencies

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up Google Cloud credentials:

    • Install Google Cloud SDK
    • Run gcloud auth application-default login
    • Or set GOOGLE_APPLICATION_CREDENTIALS environment variable
  2. Copy app_config_tmp.yaml to app_config.yaml and configure:

bucket_name: your-bucket-name
ss_urls:
    - ss://method:password@server:port

Usage

  1. Add your Shadowsocks URLs to the ss_urls list in app_config.yaml:
ss_urls:
    - ss://method:password@server:port
  1. Upload configurations:
python upload/upload_configs.py

The script will output the public URLs for both configurations.

Server Side

To manage reserved IPs on DigitalOcean. To assign a new IP to a droplet (and reassign if necessary) or only check the currently assigned IP:

  python server/do_reserved_ip_manager.py --droplet-name <your_droplet_name> --only-check

Replace <your_droplet_name> with the actual name of your DigitalOcean droplet. The onlycheck flag is optional.

Development

  • Python 3.6+
  • Uses ruamel.yaml for YAML handling
  • Uses google-cloud-storage for GCS operations

License

MIT

About

A tool to automatically generate and upload Shadowsocks or Clash subscription URLs from Shadowsocks URLs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages