-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use byte regexes to fix compiltation error #629
Conversation
I didn't notice that |
Should I add ascii check for |
Good point. I think you should add it for consistency, the whole ACL file should have exactly one syntax constraint. |
Just check every bytes of each lines if
|
String types have |
Done. I also factored out some code into new struct |
@zonyitoo I also wonder about case sensitivity. Does ss' internal dns server lowercase dns requests? Maybe add lowercasing for |
Well, for socks5 and http proxy protocol, they didn't require domain names to be lowercase. On the server side, the DNS client is using
Sounds good. |
Oh BTW, since ACLs are now limited to ASCII, should we convert IDNs to Punycode before checking if it matches any rules? |
多谢小伙伴们快速发布了代码,修复了缺陷。 |
I can convert |
Should we convert domains to lowercase ASCII when handling |
DNS server always operates with ASCII. There is no need to convert anything. And if |
So, ss' DNS server already explicitly converts names to ascii. I can add here conversion to lowercase just in case. shadowsocks-rust/crates/shadowsocks-service/src/local/dns/server.rs Lines 313 to 323 in 731e613
|
Ooh. Now I see what did you mean. There are two places with acl checks. First is |
Fixes error
error: pattern can match invalid UTF-8
in regular expressions. It still rejects unicode characters with another errorerror: Unicode not allowed here
but that's fine since there is no unicode characters in dns records anyway.