git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/6] remote-http(s): Support SOCKS proxies

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Nov 9, 2015, 22:28 UTC
Message-ID
<87si4e6c49.fsf@red.patthoyts.tk>
In-Reply-To
<alpine.DEB.1.00.1510271651420.31610@s15462909.onlinehome-server.info>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 60 quoted lines
>Hi,
>
>On Tue, 27 Oct 2015, Johannes Schindelin wrote:
>
>> On Mon, 26 Oct 2015, Junio C Hamano wrote:
>> 
>> > James McCoy <vega.james@gmail.com> writes:
>> > 
>> > >> The code looks OK but the last paragraph makes _us_ worried.  What
>> > >> is the licensing status of the original at SO?
>> > >
>> > > According to Stackoverflow[0],
>> > >
>> > >   As noted in the Stack Exchange Terms of Service[1] and in the footer of
>> > >   every page, all user contributions are licensed under Creative Commons
>> > >   Attribution-Share Alike[2]. Proper attribution[3] is required if you
>> > >   republish any Stack Exchange content.
>> > >
>> > > [0]: https://stackoverflow.com/help/licensing
>> > 
>> > Yes, and (please correct me if I am wrong--this is one of the times
>> > I hope I am wrong!) I thought BY-SA does not mesh well with GPLv2,
>> > in which case we cannot use this patch (instead somebody has to
>> > reimplement the same without copying).
>> 
>> Pat, could you please allow us to insert your SOB?
>
>On second thought... Junio, could you please sanity-check my claim that
>this patch:
>
>-- snip --
>@@ -465,6 +465,17 @@ static CURL *get_curl_handle(void)
> 
>        if (curl_http_proxy) {
>                curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
>+#if LIBCURL_VERSION_NUM >= 0x071800
>+               if (starts_with(curl_http_proxy, "socks5"))
>+                       curl_easy_setopt(result,
>+                               CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
>+               else if (starts_with(curl_http_proxy, "socks4a"))
>+                       curl_easy_setopt(result,
>+                               CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
>+               else if (starts_with(curl_http_proxy, "socks"))
>+                       curl_easy_setopt(result,
>+                               CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
>+#endif
>        }
> #if LIBCURL_VERSION_NUM >= 0x070a07
>        curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
>-- snap --
>
>cannot be copyrighted because it is pretty much the only way to implement
>said functionality?
>
>Still, Pat, if you find the time, could you please simply relicense your
>patch (I know that you are fine with it, but we need an explicit
>statement)?
>
>Ciao,
>Johannes

A bit late to the party but 'yes'. Frankly by posting something to SO I rather consider it public domain but I hereby license this patch as required for use by the Git project.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 14 of 48 in “Miscellaneous platform-independent patches from Git for Windows”
  1. 0/6 Miscellaneous platform-independent patches from Git for WindowsJohannes Schindelin, Oct 26, 2015
  2. 1/6 Only use CURLOPT_LOGIN_OPTIONS if it is actually availableJohannes Schindelin, Oct 26, 2015
  3. Junio C HamanoOct 26, 2015
  4. 2/6 remote-http(s): Support SOCKS proxiesJohannes Schindelin, Oct 26, 2015
  5. Junio C HamanoOct 26, 2015
  6. James McCoyOct 27, 2015
  7. Junio C HamanoOct 27, 2015
  8. Johannes SchindelinOct 27, 2015
  9. Johannes SchindelinOct 27, 2015
  10. Junio C HamanoOct 27, 2015
  11. Junio C HamanoOct 27, 2015
  12. Junio C HamanoOct 27, 2015
  13. Johannes SchindelinOct 30, 2015
  14. Pat ThoytsNov 9, 2015
  15. Johannes SchindelinNov 16, 2015
  16. Junio C HamanoNov 18, 2015
  17. 3/6 Facilitate debugging Git executables in tests with gdbJohannes Schindelin, Oct 26, 2015
  18. Jonathan NiederOct 26, 2015
  19. Johannes SchindelinOct 27, 2015
  20. Junio C HamanoOct 27, 2015
  21. Jeff KingOct 27, 2015
  22. Stefan BellerOct 27, 2015
  23. Jeff KingOct 27, 2015
  24. Johannes SchindelinOct 30, 2015
  25. Jeff KingOct 30, 2015
  26. Johannes SchindelinOct 30, 2015
  27. Junio C HamanoOct 30, 2015
  28. Jonathan NiederOct 30, 2015
  29. Johannes SchindelinOct 30, 2015
  30. Jeff KingOct 30, 2015
  31. Jonathan NiederOct 30, 2015
  32. Junio C HamanoOct 30, 2015
  33. Johannes SchindelinOct 30, 2015
  34. Jonathan NiederOct 30, 2015
  35. Duy NguyenOct 27, 2015
  36. Junio C HamanoOct 29, 2015
  37. Victor LeschukOct 29, 2015
  38. Johannes SchindelinOct 30, 2015
  39. Victor LeschukNov 1, 2015
  40. Johannes SchindelinNov 1, 2015
  41. 4/6 Squelch warning about an integer overflowJohannes Schindelin, Oct 26, 2015
  42. Junio C HamanoOct 26, 2015
  43. Johannes SchindelinOct 30, 2015
  44. Junio C HamanoOct 30, 2015
  45. 5/6 Silence GCC's "cast of pointer to integer of a different size" warningJohannes Schindelin, Oct 26, 2015
  46. Junio C HamanoOct 26, 2015
  47. 6/6 Correct fscanf formatting string for I64u valuesJohannes Schindelin, Oct 26, 2015
  48. Junio C HamanoOct 26, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.