Giter Site home page Giter Site logo

Comments (8)

elazarl avatar elazarl commented on September 27, 2024

Hi,

Thanks for using goproxy.

After running your code in the terminal, I'm getting a proxy, when I'm surfing through it I'm getting output such as:

top-fwz1.mail.ru -> image/gif
pagead2.googlesyndication.com -> text/html; charset=UTF-8
pagead2.googlesyndication.com -> text/html; charset=UTF-8
pagead2.googlesyndication.com -> text/html; charset=UTF-8

Which seems like what you're trying to do.

What exactly doesn't work?

from goproxy.

chir0n avatar chir0n commented on September 27, 2024

Thank you for the reply.

I don't get the output you got. It seems like it isn't entering the function DoFunc().

I'm using go 1.1.1 on top of Fedora 19. Can that be the problem?

from goproxy.

elazarl avatar elazarl commented on September 27, 2024

Can you explain me how exaclty do you run the program, and how do you
expect that to behave?

To verify that DoFunc is called, add os.Exit() to the function, and see
that the process indeed exits.

On Fri, Feb 14, 2014 at 2:24 PM, chir0n [email protected] wrote:

Thank you for the reply.

I don't get the output you got. It seems like it isn't entering the
function DoFunc().

I'm using go 1.1.1 on top of Fedora 19. Can that be the problem?

Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-35078985
.

from goproxy.

chir0n avatar chir0n commented on September 27, 2024

Sure. I run the program with the command "go run proxy.go". I was expecting that for each request the proxy printed a line like this:

pagead2.googlesyndication.com -> text/html; charset=UTF-8

When I run "go run proxy.go" the proxy works and I'm able to visit any page with my webbrowser, however I don't get the messages above on the terminal.

from goproxy.

elazarl avatar elazarl commented on September 27, 2024

Did you verify your browser is indeed using the proxy?

Can you try to issue a curl, ie

$ http_proxy=localhost:8080 curl -v en.wikipedia.org

and see if you still don't have anything printed?

On Fri, Feb 14, 2014 at 2:35 PM, chir0n [email protected] wrote:

Sure. I run the program with the command "go run proxy.go". I was
expecting that for each request the proxy printed a line like this:

pagead2.googlesyndication.com -> text/html; charset=UTF-8

When I run "go run proxy.go" the proxy works and I'm able to visit any
page with my webbrowser, however I don't get the messages above on the
terminal.

Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-35079642
.

from goproxy.

chir0n avatar chir0n commented on September 27, 2024

Hi,

I executed the suggested curl command and my proxy still don't print anything.

The curl output was:

  • About to connect() to proxy localhost port 8080 (#0)
  • Trying ::1...
  • Connected to localhost (::1) port 8080 (#0)

    GET HTTP://en.wikipedia.org HTTP/1.1
    User-Agent: curl/7.29.0
    Host: en.wikipedia.org
    Accept: /
    Proxy-Connection: Keep-Alive

    < HTTP/1.1 301 Moved Permanently
    < Age: 831
    < Cache-Control: s-maxage=1200, must-revalidate, max-age=0
    < Connection: keep-alive
    < Content-Type: text/html; charset=utf-8
    < Date: Fri, 14 Feb 2014 20:39:41 GMT
    < Last-Modified: Fri, 14 Feb 2014 20:25:50 GMT
    < Location: http://en.wikipedia.org/wiki/Main_Page
    < Server: Apache
    < Vary: Accept-Encoding,X-Forwarded-Proto,Cookie
    < Via: 1.1 varnish, 1.1 varnish
    < X-Cache: cp1066 hit (9), cp1055 frontend hit (1030)
    < X-Content-Type-Options: nosniff
    < X-Powered-By: PHP/5.3.10-1ubuntu3.9+wmf1
    < X-Varnish: 555200400 555199185, 2931069829 2929722113
    < X-Vary-Options: Accept-Encoding;list-contains=gzip,X-Forwarded-Proto,Cookie;string-contains=enwikiToken;string-contains=enwikiLoggedOut;string-contains=forceHTTPS;string-contains=enwikiSession;string-contains=centralauth_Token;string-contains=centralauth_Session;string-contains=centralauth_LoggedOut;string-contains=mf_useformat;string-contains=stopMobileRedirect
    < Transfer-Encoding: chunked
    <
  • Connection #0 to host localhost left intact

from goproxy.

chir0n avatar chir0n commented on September 27, 2024

Oh, and inserting os.Exit(0) to the function doesn't make the proxy exit.

from goproxy.

chir0n avatar chir0n commented on September 27, 2024

I updated to Go 1.2 and it's working now.

from goproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.