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.
- 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
app_config_tmp.yaml
- Application configuration (bucket name, SS URLs)clash_config_tmp.yaml
- Temporary Clash configuration fileupload/upload_configs.py
- Script to generate Clash config and upload configs to Google Cloud Storagerequirements.txt
- Python dependencies
- Install dependencies:
pip install -r requirements.txt
-
Set up Google Cloud credentials:
- Install Google Cloud SDK
- Run
gcloud auth application-default login
- Or set
GOOGLE_APPLICATION_CREDENTIALS
environment variable
-
Copy
app_config_tmp.yaml
toapp_config.yaml
and configure:
bucket_name: your-bucket-name
ss_urls:
- ss://method:password@server:port
- Add your Shadowsocks URLs to the
ss_urls
list inapp_config.yaml
:
ss_urls:
- ss://method:password@server:port
- Upload configurations:
python upload/upload_configs.py
The script will output the public URLs for both configurations.
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.
- Python 3.6+
- Uses
ruamel.yaml
for YAML handling - Uses
google-cloud-storage
for GCS operations
MIT