Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Proxy Support #3574

Closed
nazzer23 opened this issue Aug 11, 2016 · 30 comments
Closed

Implement Proxy Support #3574

nazzer23 opened this issue Aug 11, 2016 · 30 comments

Comments

@nazzer23
Copy link

nazzer23 commented Aug 11, 2016

Idk how to request that you add proxy support so uhm here?

@RedViper9
Copy link
Contributor

Correct me if I'm wrong, but a proxy only handles browser traffic. You want a VPN. There are free and paid ones and the bot works fine through a VPN.

@elicwhite
Copy link
Contributor

We had a PR that added proxy support to the bot so that you can use a VPN. It had a bug and was reverted.

Perhaps @alecuba16 can re-add that functionality, or someone can utilize the code he wrote the first time to implement this feature.

@maddo7
Copy link

maddo7 commented Aug 11, 2016

There are HTTP and Socks proxies. HTTP proxies tunnel HTTP/HTTPS requests only while socks can tunnel all requets. But isn't Pokemon Go just using HTTP(S) requests anyways? A VPN would be overkill. There aren't that many VPNs so ppl would end up having the same and getting banned anyways, there are far more HTTP/SOCKS proxies out there.

@Lordedi
Copy link

Lordedi commented Aug 11, 2016

I think I have IP banned because I can't login with my google account:
[11:32:38] Loading cached location...
[11:32:38] Loaded location (34.009797, -118.49813, 0.0) from cache
[11:32:38] Login procedure started.Traceback (most recent call last):
File "pokecli.py", line 530, in
main()
File "pokecli.py", line 138, in main
report_summary(bot)
File "pokecli.py", line 147, in report_summary
metrics.capture_stats()
File "/home/raviss_e/PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
response_dict = request.call()
File "/home/raviss_e/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 90, in call
if not self.can_call():
File "/home/raviss_e/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 58, in can_call
raise NotLoggedInException()
pgoapi.exceptions.NotLoggedInException

but with my PTC account, it's work fine...

@Dracon23
Copy link

@RedViper9 No, proxies handle all sorts of traffic, depending on their type. Most Socks proxies handle a lot more then just your browser traffic.

@albttx
Copy link

albttx commented Aug 11, 2016

@Lordedi When you're IP banned, the bot it's just walking but no pokemon appear.
I think your problem is somewhere else..
You maybe have an error with your config files, or installation dependency,
try launching it with docker.

@Lordedi
Copy link

Lordedi commented Aug 11, 2016

@ale-batt maybe but since yesterday I cannot resolve my problem :/

@albttx
Copy link

albttx commented Aug 11, 2016

Are you using the dev branch ?

@Lordedi
Copy link

Lordedi commented Aug 11, 2016

Yes

@albttx
Copy link

albttx commented Aug 11, 2016

the last update ?
git fetch ; git pull

@Lordedi
Copy link

Lordedi commented Aug 11, 2016

Yes 💃

@Carlito007
Copy link

hi how can i use vpn/proxy to connect bot ?

@albttx
Copy link

albttx commented Aug 11, 2016

@Lordedi So no idea... Try a different config file :/

@Lordedi
Copy link

Lordedi commented Aug 11, 2016

@ale-batt Yes, strange because ptc account works fine but not google mh
Anyway thanks for your help

@MaxPPP
Copy link

MaxPPP commented Aug 11, 2016

I am running the Bot on a Ubuntu VPS and it works perfect for an Hour or two..then it looks like i
get a IP-Ban because he wont find Pokestops or Pokemon to catch.

Is there a known work-around for using a proxy with the Bot ?

@jalliance
Copy link

jalliance commented Aug 11, 2016

Set an environment variable for http_proxy and just run normally. That shell window will be proxied to the IP till you close it.

export http_proxy=http://server-ip:port/ 

@mrik974
Copy link

mrik974 commented Aug 11, 2016

Will there be support for SOCKS Proxies as well ?

@umbreon222
Copy link
Contributor

Similiar issues #3489 #3488 #3477 #3233

@steffenreimann
Copy link

Where this variable has to be inserted?

export http_proxy=http://server-ip:port/

@mrik974
Copy link

mrik974 commented Aug 12, 2016

You dont have to "insert it", just type this command before launching the bot via your command prompt.

Le 12 août 2016 à 08:22, steffenreimann [email protected] a écrit :

Where this variable has to be inserted?

export http_proxy=http://server-ip:port/


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@alxnegrila
Copy link

If you need socks, you can use proxychains(4).

@k4n30 k4n30 changed the title Implement Proxy Support so people can still use the tool if they get ip banned. Implement Proxy Support Aug 13, 2016
@firzzen
Copy link

firzzen commented Aug 13, 2016

@jalliance problem with that is it can only be used for one bot. I suppose the idea of proxying is meant for multiple.

@k4n30
Copy link
Contributor

k4n30 commented Aug 17, 2016

Tor support has been added to the docker implementation of the bot #4108 Although it may not be the final solution you're after, it's a step in the right direction

@mcrowson
Copy link
Contributor

mcrowson commented Aug 17, 2016

The way it is done in #4108 is just to set the environment variables for the bot so the requests library uses the proxy.

http://docs.python-requests.org/en/master/user/advanced/#proxies

I'm sure you could use this for any proxy you wanted. As the pgoapi is a different project and we cannot give it the proxies, the environment variables was the only way I could find to do this.

@br0kenb1nary
Copy link

I have created a plugin that adds proxy support by finding available proxies based on your players latitude and longitude position. Hope it helps: https://github.com/br0kenb1nary/PogoPlugin

@k4n30
Copy link
Contributor

k4n30 commented Aug 18, 2016

@br0kenb1nary do you mind creating a pull request or is this the first candidate for the plugins

@TheSavior - FYI

@br0kenb1nary
Copy link

br0kenb1nary commented Aug 19, 2016

Created a pull request. The plugin is stable however being that it is Shell based on not Python based I am not sure what you want included to support the Plugin format laid out here: https://github.com/TheSavior/test-pgo-plugin

Do you plan on having a plugin branch? Not sure which to use for the pull

@k4n30
Copy link
Contributor

k4n30 commented Aug 19, 2016

@TheSavior care to elaborate, are we going to allow plugin PRs against dev? or what was the plan to show users the available plugins?

@br0kenb1nary
Copy link

Perhaps a master plugin repo list with array: name, git URL and init file. Clone to subdirectory on initial load and run the init file as: if sh then if Python then

Keeps everything independent and avoids cross branch conflicts

@elicwhite
Copy link
Contributor

The goal of plugins is that end users can add additional tasks from repos that other people create than what is in this repo. They can install the ones they want by adding them to their config. They would not be installed automatically or for all users.

However, what you have created isn't a plugin in the pokemongo-bot sense. It is just a run script. I think if we were to accept a PR adding this functionality to core, it would probably be some change to pokecli.py. Essentially exactly like this PR: #2358

When I say exactly, I think I mean exactly that PR + whatever fix is needed that caused the failures. What the failures were, I'm not sure I remember anymore.

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

No branches or pull requests