outline-sdk icon indicating copy to clipboard operation
outline-sdk copied to clipboard

Outline-cli does not support ssconf:// link

Open databasd opened this issue 1 year ago • 5 comments

I've built outline-cli from source as described in the readme, however, I get the following error when providing `ssconf://' argument:

failed to create OutlineDevice: config must start with 'ss://'

Is support for this functionality coming soon?

databasd avatar Mar 14 '24 07:03 databasd

Hi @databasd , Outline CLI can't use "ssconf://" yet. We do plan to add support for it someday. You may also fork the project and contribute to the corresponding code to support this feature.

jyyi1 avatar Mar 18 '24 15:03 jyyi1

Hi. I would contribute but where is the reference code for parsing ssconf:// in the gui application ?

databasd avatar Mar 19 '24 01:03 databasd

Hi @databasd ,

Thanks for being willing to help! Our dynamic key parsing logic is implemented in TypeScript, and we need to convert it to Golang:

  1. Change ssconf://<my-dynamic-key> to HTTPS URL https://<my-dynamic-key>
  2. Fetch the HTTPS URL, you may use Golang's http package to accomplish that
  3. Process the response: 3a. If it's a static Outline key (starts with ss://), simple reuse the existing Go implementation for parsing it 3b. If it's a JSON object ({ "method": "...", "password": "...", "server": "...", "server_port": ..., "prefix": "..." }, where prefix is optional), you may either use json.Unmarshal to parse the object and construct the shadowsocksConfig object, or you may convert the JSON back into a static Outline key (ss://) and jump to step 3a.

Feel free to create a draft pull request to get the discussion started. We can work on the details together.

Please note that, you can start using your implementation even before the review is complete.

jyyi1 avatar Mar 19 '24 21:03 jyyi1

Hi @jyyi1 , opened a PR for this but I'd like to discuss the issues I'm currently facing

pmoieni avatar Aug 25 '24 12:08 pmoieni

Thank you @pmoieni ! Hope your work would get accepted

alexander-potemkin avatar May 27 '25 12:05 alexander-potemkin