Skip to content

Instantly share code, notes, and snippets.

@cute
Created April 23, 2019 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cute/6a21c69e8f5dea1bc0d738229abe3cb9 to your computer and use it in GitHub Desktop.
Save cute/6a21c69e8f5dea1bc0d738229abe3cb9 to your computer and use it in GitHub Desktop.

1: curl -v -X POST -d 'email=sp3@sspanel.dev&passwd=12345678' http://localhost:8000/api/token

{
	"ret": 1,
	"msg": "ok",
	"data": {
		"token": "jG63BhwPKBhBvcB2etJBcfcGQN5hYqQA2QNudTXPHtzs6CNT2dftf9XNWv8ekZ6L",
		"user_id": 1
	}
}

2: curl http://localhost:8000/api/user/1?access_token=jG63BhwPKBhBvcB2etJBcfcGQN5hYqQA2QNudTXPHtzs6CNT2dftf9XNWv8ekZ6L

{
    "data": {
        "d": 0,
        "email": "sp3@sspanel.dev",
        "enable": 1,
        "expire_time": 1456593755,
        "id": 1,
        "invite_num": 46,
        "last_check_in_time": 1460209591,
        "method": "rc4-md5",
        "obfs": "plain",
        "obfs_param": null,
        "passwd": "123gxopp",
        "port": 21567,
        "protocol": "origin",
        "protocol_param": null,
        "reg_date": "2019-04-23 16:37:14",
        "switch": 1,
        "t": 1460651176,
        "transfer_enable": 21474836480,
        "type": 7,
        "u": 0,
        "v2ray_alter_id": 64,
        "v2ray_level": 2,
        "v2ray_uuid": ""
    },
    "msg": "ok",
    "ret": 1
}

3: curl 'http://localhost:8000/api/node?access_token=jG63BhwPKBhBvcB2etJBcfcGQN5hYqQA2QNudTXPHtzs6CNT2dftf9XNWv8ekZ6L'

{
    "data": [
        {
            "add_method": "none",
            "add_passwd": "",
            "add_port_only": 0,
            "custom_method": 0,
            "custom_rss": 0,
            "id": 2,
            "info": "",
            "method": "aes-128-gcm",
            "name": "baidu.com",
            "obfs": "plain",
            "obfs_param": "",
            "offset": 0,
            "protocol": "origin",
            "protocol_param": "",
            "server": "baidu.com",
            "sort": 0,
            "ss": 1,
            "ssr": 0,
            "ssr_port": 0,
            "status": "",
            "traffic_rate": 1,
            "type": 1,
            "v2ray": 0,
            "v2ray_path": "",
            "v2ray_port": 80,
            "v2ray_protocol": "tcp",
            "v2ray_tls": 0
        },
        {
            "add_method": "rc4-md5",
            "add_passwd": "111111",
            "add_port_only": 1,
            "custom_method": 0,
            "custom_rss": 0,
            "id": 3,
            "info": "",
            "method": "aes-128-gcm",
            "name": "baidu.com222",
            "obfs": "plain",
            "obfs_param": "",
            "offset": 0,
            "protocol": "origin",
            "protocol_param": "",
            "server": "baidu.com",
            "sort": 0,
            "ss": 0,
            "ssr": 1,
            "ssr_port": 0,
            "status": "",
            "traffic_rate": 1,
            "type": 1,
            "v2ray": 0,
            "v2ray_path": "",
            "v2ray_port": 80,
            "v2ray_protocol": "tcp",
            "v2ray_tls": 0
        },
        {
            "add_method": "rc4-md5",
            "add_passwd": "123456",
            "add_port_only": 1,
            "custom_method": 1,
            "custom_rss": 0,
            "id": 1,
            "info": "info",
            "method": "rc4",
            "name": "name3",
            "obfs": "plain",
            "obfs_param": "",
            "offset": 0,
            "protocol": "origin",
            "protocol_param": "",
            "server": "server",
            "sort": 1,
            "ss": 1,
            "ssr": 0,
            "ssr_port": 0,
            "status": "ok",
            "traffic_rate": 0.5,
            "type": 1,
            "v2ray": 0,
            "v2ray_path": "/ray",
            "v2ray_port": 8100,
            "v2ray_protocol": "tcp",
            "v2ray_tls": 0
        }
    ],
    "msg": "ok",
    "ret": 1
}

4:根据第二部和第三步计算出相关节点信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment