-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
New option for ss:// URL association #2855
Conversation
also with some i18n update
The quick test is pass, Base appveyor version 4.1.10.4. But there is a small issue: when ss:// URI is invalid, There is no error message. |
RegistryKey ssURLAssociation = null; | ||
try | ||
{ | ||
ssURLAssociation = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Classes\ss", RegistryKeyPermissionCheck.ReadWriteSubTree); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps using full name "Shadowsocks" is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps using full name "Shadowsocks" is better
By using "Shadowsocks" you are registering Shadowsocks:// instead of ss://.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @database64128 , I made a mistake...
Note:
Outline or other software may also register the protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outline or other software may also register the protocol
Just tested with Outline installed. The current behavior of our implementation is overwriting existing association, which is not perfect, but good enough. As far as I know, there is no way to associate a URI scheme with more than one Win32 application. The API for that is only available for UWP apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that Outline overwrites the URI association on boot. Apparently they are using the same implementation, with a more aggressive approach and no way to turn off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our implementation checks if ss:// is associated with itself on boot to determine the status of association, and shows it with MenuItem.Checked
. It's up to the user to associate the URI scheme or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with a more aggressive approach and no way to turn off
We need open an issue for it.
Actually the original "Import URL from clipboard" also shows no error message. I added messages for both in a1e4245. |
Name |
Resolved in 4bd33db. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quick test is pass, Base appveyor version 4.1.10.7.
:+1 Looks good to me, but someone else must approve.
Any plan to merge? I've been using the build on my PCs and everything seems good. |
Merged. Thank you very much @database64128 ! |
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
x
into all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Compiled the code with Visual Studio
Require translation update
Require document update (readme.md, wikipage, etc)
What is the purpose of your pull request?
Description of your pull request and other information
Added an option to allow association with ss:// URLs.
This PR was made at the request of @studentmain . Credit goes to @studentmain for most of the code 👨💻!