Skip to content

Instantly share code, notes, and snippets.

@tim-2
Created June 15, 2016 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-2/91ebd04cadefa09967e2c9647b51a96b to your computer and use it in GitHub Desktop.
Save tim-2/91ebd04cadefa09967e2c9647b51a96b to your computer and use it in GitHub Desktop.
$server = IO::Socket::Socks->new(
Blocking => 0,
Listen => 10,
ProxyAddr => '127.0.0.1',
ProxyPort => $port,
RequireAuth => 1,
SocksVersion => 4,
);
$ua->server->url('http');
$ua->proxy->https("socks4://foo:bar\@127.0.0.1:$port");
$tx = $ua->get('/');
ok $tx->success, 'successful';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment