{"action":"created","issue":{"url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/17","repository_url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs","labels_url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/17/comments","events_url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/17/events","html_url":"https://github.com/Corion/www-mechanize-phantomjs/issues/17","id":310410181,"number":17,"title":"Proxy type is always direct in info logs proxy\":{\"proxyType\":\"direct\"}}","user":{"login":"aaryabhatt","id":1642352,"avatar_url":"https://avatars3.githubusercontent.com/u/1642352?v=4","gravatar_id":"","url":"https://api.github.com/users/aaryabhatt","html_url":"https://github.com/aaryabhatt","followers_url":"https://api.github.com/users/aaryabhatt/followers","following_url":"https://api.github.com/users/aaryabhatt/following{/other_user}","gists_url":"https://api.github.com/users/aaryabhatt/gists{/gist_id}","starred_url":"https://api.github.com/users/aaryabhatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaryabhatt/subscriptions","organizations_url":"https://api.github.com/users/aaryabhatt/orgs","repos_url":"https://api.github.com/users/aaryabhatt/repos","events_url":"https://api.github.com/users/aaryabhatt/events{/privacy}","received_events_url":"https://api.github.com/users/aaryabhatt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-02T06:47:42Z","updated_at":"2018-04-02T08:36:04Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am trying to connect this with tor proxy, but it is not connecting to proxy  and always go directly.\r\nsee below my code.\r\n\r\n`use WWW::Mechanize::PhantomJS;\r\n my $mech = WWW::Mechanize::PhantomJS->new(\r\n                   phantomjs_arg => [ \"--proxy=127.0.0.1:9050 --proxy-type=socks5 --ssl-protocol=any --ignore-ssl-errors\" ],\r\n                   log => 'INFO' );\r\n            \r\nmy $url = \"https://example.com/home\";\r\n\r\n$mech->get( $url );\r\n` \r\ninfo logs are given below\r\n[INFO  - 2018-04-02T06:32:40.966Z] GhostDriver - Main - running on port 8910\r\n[INFO  - 2018-04-02T06:32:42.667Z] Session [a5c1ef30-363f-11e8-a95c-e32e0ebfd9d2] - page.settings - {\"XSSAuditingEnabled\":false,\"javascriptCanCloseWindows\":true,\"javascriptCanOpenWindows\":true,\"javascriptEnabled\":true,\"loadImages\":true,\"localToRemoteUrlAccessEnabled\":false,\"userAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1\"}\r\n[INFO  - 2018-04-02T06:32:42.667Z] Session [a5c1ef30-363f-11e8-a95c-e32e0ebfd9d2] - page.customHeaders:  - {}\r\n[INFO  - 2018-04-02T06:32:42.667Z] Session [a5c1ef30-363f-11e8-a95c-e32e0ebfd9d2] - Session.negotiatedCapabilities - {\"browserName\":\"phantomjs\",\"version\":\"2.1.1\",\"driverName\":\"ghostdriver\",\"driverVersion\":\"1.1.0\",\"platform\":\"linux-unknown-64bit\",\"javascriptEnabled\":true,\"takesScreenshot\":true,\"handlesAlerts\":false,\"databaseEnabled\":false,\"locationContextEnabled\":false,\"applicationCacheEnabled\":false,\"browserConnectionEnabled\":false,\"cssSelectorsEnabled\":true,\"webStorageEnabled\":false,\"rotatable\":false,\"acceptSslCerts\":false,\"nativeEvents\":true,\"**proxy\":{\"proxyType\":\"direct\"}}**\r\n[INFO  - 2018-04-02T06:32:42.667Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: a5c1ef30-363f-11e8-a95c-e32e0ebfd9d2\r\n\r\nproxy is working fine. I tried to test it with bash\r\nphantomjs --proxy=127.0.0.1:9050 --proxy-type=socks5 --ssl-protocol=any  page_load.js\r\nthat wrks fine."},"comment":{"url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/comments/377885122","html_url":"https://github.com/Corion/www-mechanize-phantomjs/issues/17#issuecomment-377885122","issue_url":"https://api.github.com/repos/Corion/www-mechanize-phantomjs/issues/17","id":377885122,"user":{"login":"aaryabhatt","id":1642352,"avatar_url":"https://avatars3.githubusercontent.com/u/1642352?v=4","gravatar_id":"","url":"https://api.github.com/users/aaryabhatt","html_url":"https://github.com/aaryabhatt","followers_url":"https://api.github.com/users/aaryabhatt/followers","following_url":"https://api.github.com/users/aaryabhatt/following{/other_user}","gists_url":"https://api.github.com/users/aaryabhatt/gists{/gist_id}","starred_url":"https://api.github.com/users/aaryabhatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaryabhatt/subscriptions","organizations_url":"https://api.github.com/users/aaryabhatt/orgs","repos_url":"https://api.github.com/users/aaryabhatt/repos","events_url":"https://api.github.com/users/aaryabhatt/events{/privacy}","received_events_url":"https://api.github.com/users/aaryabhatt/received_events","type":"User","site_admin":false},"created_at":"2018-04-02T08:36:04Z","updated_at":"2018-04-02T08:36:04Z","author_association":"NONE","body":"Corion thank you very much, it solved the issue, now requests are going through the proxy server.\r\nthat is sufficient for me.\r\n\r\nBut if Check the info logs, it is still showing direct proxy in proxyType, may be issue could be other thing not known to me. Just point it here for your info, see the below logs.\r\n\r\n[INFO  - 2018-04-02T07:31:57.223Z] GhostDriver - Main - running on port 8910\r\n[INFO  - 2018-04-02T07:31:59.144Z] Session [ed956910-3647-11e8-8532-e112d9726966] - page.settings - {\"XSSAuditingEnabled\":false,\"javascriptCanCloseWindows\":true,\"javascriptCanOpenWindows\":true,\"javascriptEnabled\":true,\"loadImages\":true,\"localToRemoteUrlAccessEnabled\":false,\"userAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1\"}\r\n[INFO  - 2018-04-02T07:31:59.145Z] Session [ed956910-3647-11e8-8532-e112d9726966] - page.customHeaders:  - {}\r\n[INFO  - 2018-04-02T07:31:59.145Z] Session [ed956910-3647-11e8-8532-e112d9726966] - Session.negotiatedCapabilities - {\"browserName\":\"phantomjs\",\"version\":\"2.1.1\",\"driverName\":\"ghostdriver\",\"driverVersion\":\"1.1.0\",\"platform\":\"linux-unknown-64bit\",\"javascriptEnabled\":true,\"takesScreenshot\":true,\"handlesAlerts\":false,\"databaseEnabled\":false,\"locationContextEnabled\":false,\"applicationCacheEnabled\":false,\"browserConnectionEnabled\":false,\"cssSelectorsEnabled\":true,\"webStorageEnabled\":false,\"rotatable\":false,\"acceptSslCerts\":false,\"nativeEvents\":true,\"proxy\":{\"proxyType\":\"direct\"}}\r\n\r\nthanks again."}}
{"actor":{"display_login":"aaryabhatt"}}