Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shavit
Copy link
Contributor

@shavit shavit commented May 28, 2017

To use the proxy use the Tor(url *url.URL) (err error) method

var err error
bow := surf.NewBrowser()
//err:= bow.Open("http://check.torproject.org")
//  if err != nil {
//    panic(err)
//  }
// Without proxy: Sorry. You are not using Tor.
//fmt.Println(bow.Title())

// With proxy: Congratulations. This browser is configured to use Tor.
u, _ := url.Parse("socks5://127.0.0.1:9050")
bow.Tor(u)
err = bow.Open("http://check.torproject.org")
  if err != nil {
   panic(err)
 }
fmt.Println(bow.Title())

@lxt2
Copy link
Collaborator

lxt2 commented Jul 29, 2017

I'm reluctant to add a Tor specific method when there is already possible via SetTransport. Perhaps this could be a SetProxy instead?

@shavit
Copy link
Contributor Author

shavit commented Jul 31, 2017

Yes, see 5948ff4

@headzoo
Copy link
Owner

headzoo commented Jul 31, 2017

My only reservation is passing a *url.URL to SetProxy() instead of a string like the other methods which take a url.

@shavit
Copy link
Contributor Author

shavit commented Jul 31, 2017

ok, see 06b521e

@headzoo
Copy link
Owner

headzoo commented Jul 31, 2017

Thanks, looks good to me. I'll wait on @lxt2 so we can merge a bunch of these pull requests at once into one patch release. Should be soon.

@lxt2 lxt2 changed the base branch from dev to master August 1, 2017 10:40
README.md Outdated
(with a nifty user agent builder), submitting forms, DOM selection and traversal via jQuery style
CSS selectors, scraping assets like images, stylesheets, and other features.

**NOTE: DEVELOPMENT ON THIS PROJECT IS VERY SLOW!**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, not sure why this is being included.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an old pull request

@lxt2 lxt2 mentioned this pull request Aug 5, 2017
@lxt2
Copy link
Collaborator

lxt2 commented Aug 5, 2017

Moving to #72.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants