diff options
author | Badlop <badlop@process-one.net> | 2008-07-24 18:03:28 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-07-24 18:03:28 +0000 |
commit | 1e115254059214db8f1f970884548e77a40b7de7 (patch) | |
tree | bcf02a45b906349fce772e8c9eef988556d6eafb /src/mod_proxy65/mod_proxy65_lib.erl | |
parent | * src/mod_register.erl: When a registration is blocked due to IP (diff) |
* src/mod_proxy65/mod_proxy65_lib.erl: Send protocol compliant
SOCKS5 reply; this breaks support of uncompliant Psi<0.10 (thanks
to Felix Geyer)(EJAB-632)
* src/mod_proxy65/mod_proxy65_stream.erl: Likewise
SVN Revision: 1488
Diffstat (limited to 'src/mod_proxy65/mod_proxy65_lib.erl')
-rw-r--r-- | src/mod_proxy65/mod_proxy65_lib.erl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mod_proxy65/mod_proxy65_lib.erl b/src/mod_proxy65/mod_proxy65_lib.erl index 8e30bb4a..490ef047 100644 --- a/src/mod_proxy65/mod_proxy65_lib.erl +++ b/src/mod_proxy65/mod_proxy65_lib.erl @@ -35,7 +35,7 @@ unpack_request/1, make_init_reply/1, make_auth_reply/1, - make_reply/0, + make_reply/1, make_error_reply/1, make_error_reply/2 ]). @@ -73,12 +73,8 @@ make_init_reply(Method) -> make_auth_reply(true) -> [1, ?SUCCESS]; make_auth_reply(false) -> [1, ?ERR_NOT_ALLOWED]. -%% WARNING: According to SOCKS5 RFC, this reply is _incorrect_, but -%% Psi writes junk to the beginning of the file on correct reply. -%% I'm not sure, but there may be an issue with other clients. -%% Needs more testing. -make_reply() -> - [?VERSION_5, ?SUCCESS, 0, 0, 0, 0]. +make_reply(#s5_request{rsv = RSV, sha1 = SHA1}) -> + [?VERSION_5, ?SUCCESS, RSV, ?ATYP_DOMAINNAME, length(SHA1), SHA1, 0,0]. make_error_reply(Request) -> make_error_reply(Request, ?ERR_NOT_ALLOWED). |