{"id":16167060,"url":"https://github.com/xlucn/ssr-decode","last_synced_at":"2025-03-18T23:30:51.704Z","repository":{"id":41840371,"uuid":"242701602","full_name":"xlucn/ssr-decode","owner":"xlucn","description":"一个解析Shadowsocks/ShadowsocksR/V2Ray订阅链接(http/ss/ssr/vmess)并生成json配置文件的百行shell小脚本","archived":false,"fork":false,"pushed_at":"2022-04-27T05:03:01.000Z","size":24,"stargazers_count":62,"open_issues_count":0,"forks_count":25,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T00:41:27.050Z","etag":null,"topics":["config","decode","json","shadowsocks","shadowsocksr","shell","ssr","subscription","v2ray"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlucn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-24T10:00:34.000Z","updated_at":"2025-02-16T06:54:52.000Z","dependencies_parsed_at":"2022-08-11T19:01:31.418Z","dependency_job_id":null,"html_url":"https://github.com/xlucn/ssr-decode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlucn%2Fssr-decode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlucn%2Fssr-decode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlucn%2Fssr-decode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlucn%2Fssr-decode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlucn","download_url":"https://codeload.github.com/xlucn/ssr-decode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244325180,"owners_count":20435054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","decode","json","shadowsocks","shadowsocksr","shell","ssr","subscription","v2ray"],"created_at":"2024-10-10T03:05:36.245Z","updated_at":"2025-03-18T23:30:51.411Z","avatar_url":"https://github.com/xlucn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shadowsocks(R)/V2Ray subscription decoder/parser\n\nA 100-line POSIX compatible shell script to decode, parse Shadowsocks(R)/V2Ray subscription link and create configuration files.\n\n**Disclaimer:** This is a toy project. I don't know the standard of the encoding of those link URLs, so some parsing could quite possibly go wrong.\n\n## Requirement:\n\n- `base64` to decode base64 format data\n- `curl` or `wget` to download http links (optional)\n\n## Usage\n\nThe script accepts one or more links as CLI arguments or from pipe. The links can be one of the formats:\n- A single `ss://` or `ssr://` or `vmess://` link. This contains a single configuration.\n- A `http(s)://` subscription link. This normally contains multiple configurations.\n- A base64 encoded string downloaded from a subscription link.\n\n```\nssr-decode [ http(s)://link | ss(r)://BASE64 | vmess://BASE64 | BASE64 | \u003c input.txt ]\n```\n\n### Issues\n\nSome links encode the strings in other encodings other than UTF-8, the script will still decode with UTF-8. So, expect some non-sense garbles if you run into some of them.\n\n### Customization\n\nThe `local_port` and `timeout` in the shadowsocks settings can be controlled with environment variables by `LOCAL_PORT` and `TIMEOUT`, the default is 1080 for local port and 300 for timeout\n\n```sh\nLOCAL_PORT=1234 TIMEOUT=600 ssr-decode\n```\n\n## Output\n\nThe script will generate `*.json` configuration files for each Shadowsocks(R)/V2Ray setup.\n\n- The ShadowsocksR configuration file will be named `ssr-$group-$remarks.json` with `group` normally being the service provider, `remarks` being the description of this setup.\n- The Shadowsocks configuration file will be named `ss-$server-$port.json`.\n- The V2Ray configuration file will be named `v2ray-$ps.json` with `ps` normally being the description.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlucn%2Fssr-decode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlucn%2Fssr-decode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlucn%2Fssr-decode/lists"}