[tor-bugs] #3275 [Pluggable transport]: obfsproxy's SOCKS server should support more SOCKS failure replies
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Tue May 24 21:38:29 UTC 2011
#3275: obfsproxy's SOCKS server should support more SOCKS failure replies
---------------------------------+------------------------------------------
Reporter: asn | Owner: asn
Type: defect | Status: needs_review
Priority: normal | Milestone:
Component: Pluggable transport | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
Comment(by nickm):
The errno stuff isn't quite the same on Windows. There, you'll have to
use the WSA* error codes listed in http://msdn.microsoft.com/en-
us/library/ms740668(v=vs.85).aspx
You can define a macro to make this easier:
{{{
#ifdef WINDOWS
#define ERR(e) WSA##e
#else
#define ERR(e) e
#endif
}}}
and then say
{{{
case ERR(EHOSTUNREACH): ...
}}}
and so on.
Maybe the return values of socks5_handle_request want to turn into an
enum? Having magic meanings for -2...1 seems like the reason enum was
invented.
Instead of EVUTIL_SOCKET_ERROR(), you might want evutil_socket_geterror():
it can be more accurate about connect failures on windows.
Other than that, looks good!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3275#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list