commit 0236be729748b3a73e606198a73a68b729379d6e
Author: David Fifield <[email protected]>
Date:   Sat Nov 8 16:23:32 2014 -0800

    Don't use the SOCKS requested address as a fallback URL.
    
    The code was set up to use the SOCKS address in case neither a url=
    SOCKS arg nor the --url option was present. So that this:
        Bridge meek 192.0.2.1:80
    would in effect be the same as
        Bridge meek 192.0.2.1:80 url=http://192.0.2.1:80/
    This feature was probably not ever used except as the result of a
    misconfiguration. It's better to remove it than be surprised by it
    later. It also lets us state unequivocally that the SOCKS address is
    always ignored.
---
 meek-client/meek-client.go |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index ca1e308..862f154 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -268,17 +268,13 @@ func handler(conn *pt.SocksConn) error {
        var info RequestInfo
        info.SessionID = genSessionId()
 
-       // First check url= SOCKS arg, then --url option, then SOCKS target.
+       // First check url= SOCKS arg, then --url option.
        urlArg, ok := conn.Req.Args.Get("url")
        if ok {
        } else if options.URL != "" {
                urlArg = options.URL
        } else {
-               urlArg = (&url.URL{
-                       Scheme: "http",
-                       Host:   conn.Req.Target,
-                       Path:   "/",
-               }).String()
+               return fmt.Errorf("no URL for SOCKS request")
        }
        info.URL, err = url.Parse(urlArg)
        if err != nil {

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to