Menu

#651 socks testcase patch

closed-accepted
libcurl (356)
5
2007-06-05
2007-05-18
No

as per known bugs 23c you wanted test cases for socks.

Attached is a rough first draft.

need to do something heaps better with the ssh pid for the socks.

Discussion

  • Daniel Black

    Daniel Black - 2007-05-18

    Logged In: YES
    user_id=612034
    Originator: YES

    File Added: test700

     
  • Daniel Black

    Daniel Black - 2007-05-18

    Logged In: YES
    user_id=612034
    Originator: YES

    also adds /usr/lib64/misc to sshserver.pl as thats were the sftp-server plugin is on gentoo 64 bit machines.

     
  • Dan Fandrich

    Dan Fandrich - 2007-05-19

    Logged In: YES
    user_id=236775
    Originator: NO

    This is a neat approach--I'd forgotten than SSH supports SOCKS. Might as well leverage the existing sshd support...

    Here are some specific comments about the patch:

    The test file starts curl using --socks5 but it appears that at least some versions of ssh (corresponding to versions of sshd which the test harness will run with) only support SOCKS4. To be safe, the <server> section should probably support separate socks4 and socks5 entries so socks5 tests can be skipped (in the future) when ssh doesn't support it (I don't think you need a new corresponding port number). The <keywords> should also mention SOCKS4. The <data> section is missing carriage return line-ending characters. The URL in the <command> section currently contains the wrong test number. runsocksserver should return (0,0) on error, not -1.

     
  • Daniel Black

    Daniel Black - 2007-05-19

    Logged In: YES
    user_id=612034
    Originator: YES

    thanks for the feedback. I'll incorporate these comments.
    I'm considering adding socks4 and socks5 in the features (curl-config --features) to make the code a bit neater. Is this acceptable? Thoughts on how to number the socks4/5 test case numbers? btw i'm on the #curl irc channel.

     
  • Daniel Black

    Daniel Black - 2007-05-19

    socks-curl.patch

     
  • Daniel Black

    Daniel Black - 2007-05-19

    Logged In: YES
    user_id=612034
    Originator: YES

    improved test case:
    -> checks for openssh > 3.7 which was were socks5 got introduced (http://www.openssh.com/txt/release-3.7). Do I need to handle non-open-ssh?
    -> separates sock4 & sock5
    -> lower latency pid file handling
    -> fix runsocksserver return in case of error
    -> added documentation
    File Added: socks-curl.patch

     
  • Daniel Black

    Daniel Black - 2007-05-19

    sock4 test

     
  • Daniel Black

    Daniel Black - 2007-05-19

    Logged In: YES
    user_id=612034
    Originator: YES

    couldn't work out "<data> section is missing carriage return line-ending characters." I've just copyied of testcase1. Other errors hopefully fixed.
    File Added: test700

     
  • Daniel Black

    Daniel Black - 2007-05-19

    socks5 test

     
  • Daniel Black

    Daniel Black - 2007-05-19

    Logged In: YES
    user_id=612034
    Originator: YES

    File Added: test701

     
  • Daniel Stenberg

    Daniel Stenberg - 2007-06-05

    Logged In: YES
    user_id=1110
    Originator: NO

    Great!

    (Discussed over IRC and Daniel's work on this so far has been committed)

     
  • Daniel Stenberg

    Daniel Stenberg - 2007-06-05
    • status: open --> closed-accepted