Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(www): support server name on dynamic keys #1483

Merged
merged 8 commits into from
Nov 30, 2022

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Nov 21, 2022

Adds the functionality for determining the server name that's on ss:// to ssconf://

@daniellacosse daniellacosse requested a review from a team as a code owner November 21, 2022 21:29
@daniellacosse daniellacosse changed the title feat(www): support name hash feat(www): support server name on dynamic keys Nov 21, 2022
@daniellacosse daniellacosse self-assigned this Nov 21, 2022
@daniellacosse daniellacosse marked this pull request as draft November 23, 2022 14:04
src/www/app/outline_server_repository/index.ts Outdated Show resolved Hide resolved
src/www/app/outline_server_repository/index.ts Outdated Show resolved Hide resolved
@taxi-c
Copy link

taxi-c commented Nov 24, 2022

Could it be possible to add support for extra fields over Dynamic Access Keys?
A way to redefined/overload some informations in the json files?
For example ssconf://s3.amazonaws.com/a-cool-s3-bucket/my-access-key.json:password=dfghjdfgh

@daniellacosse
Copy link
Contributor Author

Could it be possible to add support for extra fields over Dynamic Access Keys? A way to redefined/overload some informations in the json files? For example ssconf://s3.amazonaws.com/a-cool-s3-bucket/my-access-key.json:password=dfghjdfgh

This could extend into that at some point - but what's your use case?

@taxi-c
Copy link

taxi-c commented Nov 29, 2022

I don't want to have multiple bucket to update. The idea is : one bucket define one server { server, method and perhaps port}.
But the password is different for every users.
So the password (and perhaps port), could be in the ssconf:// link.
If i change the server ip, i just need to change one bucket.

It's like owning a domain, but it will be free of charge and anonymous (for the domain part)

@daniellacosse
Copy link
Contributor Author

I don't want to have multiple bucket to update. The idea is : one bucket define one server { server, method and perhaps port}. But the password is different for every users. So the password (and perhaps port), could be in the ssconf:// link. If i change the server ip, i just need to change one bucket.

It's like owning a domain, but it will be free of charge and anonymous (for the domain part)

The issue is potenitally exposing a person's password in plaintext this way. Is that something we'd be comfortable with @fortuna or would it be a security issue

src/www/app/outline_server_repository/index.ts Outdated Show resolved Hide resolved
src/www/app/outline_server_repository/index.ts Outdated Show resolved Hide resolved
@fortuna
Copy link
Collaborator

fortuna commented Nov 29, 2022

@taxi-c thanks for sharing your use case.

We are looking into an advanced config format. For example:

{
  "type": "OutlineService",
  "dialer":  {
    "type": "Shadowsocks",
    "socket": { "host": "1.2.3.4", "port": 443},
    "encryption": {
      "cipher": "chacha20-ietf-poly1305", "secret": "1234"
    }
  }
}

I can imagine a world where the objects can be references instead. For example:

{
  "type": "OutlineService",
  "dialer":  {
    "type": "Shadowsocks",
    "socket": "https://example.com/server_info",
    "encryption": {
      "cipher": "chacha20-ietf-poly1305", "secret": "1234"
    }
  }
}

Or more explicitly:

{
  "type": "OutlineService",
  "dialer":  {
    "type": "Shadowsocks",
    "socket": { "type": "Ref", "location": "https://example.com/server_info"},
    "encryption": {
      "cipher": "chacha20-ietf-poly1305", "secret": "1234"
    }
  }
}

Then https://example.com/server_info, could contain:

{"host": "1.2.3.4", "port": 443}

But it will take some time to support these, we have a lot of work to do to decouple the networking logic from our per-platform code.

@taxi-c
Copy link

taxi-c commented Nov 30, 2022

i'm not familiar with the "outline" model-threat but in the new version of shadowsocks 2022, it's seems that base64URL should be avoid. But not everybody agree. Whatever, if it's a security issue, the extra fields could be encoded in base64.

shadowsocks/shadowsocks-org#196 (comment)
Excessive and unnecessary usage of base64 encoding in URLs is a bad practice, and must be discouraged.

https://shadowsocks.org/guide/sip002.html
For AEAD-2022 (SIP022), userinfo MUST NOT be encoded with Base64URL.

@taxi-c
Copy link

taxi-c commented Nov 30, 2022

@fortuna I understand. But in the online configuration Delivery (SIP008) of shadowsocks, the json file version 1, is different.
https://shadowsocks.org/guide/sip008.html
Perhaps, it's planned to have a new version?

And i also think for my convenience use case, Outline manager will not manage all the web references (one for the server and many for all the client), and probably none of them. So i'll have to manage these references. If i have just the server reference to maintain up to date, it will be easy. And i can expect outline-manager give me the extra field password (encoded or not) in the share access option.

I also don't know if you plan to implement the shadowsocks2022 version (SIP022), who sounds great against probing.

@daniellacosse daniellacosse marked this pull request as ready for review November 30, 2022 19:07
@daniellacosse daniellacosse merged commit c6e4c34 into master Nov 30, 2022
@daniellacosse daniellacosse deleted the daniellacosse/online_config/name branch March 6, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants