All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

STORM-1112 Support SOCKS 5 proxy in the viewer (take 2)

Review Request #374 - Created June 29, 2011 and submitted

Log Linden Reviewers
http://bitbucket.org/log_linden/viewer-socks5 viewer
STORM-1112 oz.linden, Monty.Linden, stone.linden
None viewer-development
This is a continuation of Robin Cornelius's SOCKS 5 contribution, shown in https://codereview.secondlife.com/r/232/ .  I have tried to address all of the comments on that code review and do as much cleanup as possible. The diff includes everything that was submitted by Robin, as well as my work.
Major changes since I started working:
* Changed SOCKS 5 proxy control channel to use the existing LLSocket class, which is a thin wrapper around APR sockets.
* Worked with the Linden Lab UX team to revamp the proxy controls.
* Proxy credentials are now stored in the LLSecAPI password storage, which is the same that is used for users' Second Life Credentials instead of as being stored in the clear as a preference.
I've tested exclusively on Linux so far.  I'm working on a more extensive test plan that includes setting up a gateway with a restrictive firewall to verify that all traffic is going through the proxy. 

Test builds and screenshots of the changed UI elements are available from the project page, located here:
https://wiki.secondlife.com/wiki/User:Log_Linden/Socks5Viewer
Review request changed
Updated (Aug. 25, 2011, 11:15 a.m.)
* Improved threading code
* Lots of cleanup and bugfixing.
Posted (Aug. 30, 2011, 4:53 p.m.)

   

  
indra/llcommon/llsingleton.h (Diff revision 7)
 
 
why are we getting the data from within the destructor of the singleton itself?  Why not just do if (mInitState != DELETED) instead?  Seems like it would be less confusing.
indra/llmessage/llcurl.h (Diff revision 7)
 
 
maybe a little comment as to what "Easy" is in this context.  I know you just moved the code to the header, but now that it is more than an implementation detail of LLCurl, I think our expectation of documentation has increased.
indra/llmessage/llcurl.cpp (Diff revision 7)
 
 
if time_out is unused now, let's remove it from the signature
indra/llmessage/llproxy.h (Diff revision 7)
 
 
do all these #defines and socks structs need to be in the header?
indra/llmessage/llproxy.h (Diff revision 7)
 
 
I think we need something a bit more obvious to call out locking methods, maybe just a heavier comment header?
indra/llmessage/llproxy.cpp (Diff revision 7)
 
 
control-flow wise, it might be clearer to move the final check for status to a separate if, with appropriate comment along the lines of "if any of the above failed..."
indra/llmessage/llproxy.cpp (Diff revision 7)
 
 
can we reflect the potentially long blocking period in the name of the method?

tcp_wait_for_handshake or similar?
Ship it!
Posted (Aug. 30, 2011, 4:54 p.m.)
my comments were mostly about style and making the code a bit more self documenting.  I couldn't find any obvious logic errors, memory leaks, buffer overruns, data races, etc.  So, as far as I'm concerned, it's shippable.