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

Proxies join? #169

Open
OnTheCodeOfficial opened this issue Jul 27, 2022 · 1 comment
Open

Proxies join? #169

OnTheCodeOfficial opened this issue Jul 27, 2022 · 1 comment

Comments

@OnTheCodeOfficial
Copy link

OnTheCodeOfficial commented Jul 27, 2022

So how can i join the bot with the proxy?

Here is the code for bot to join it's worked but i wonder how to use proxy to connect the server with it ?
Maybe in the line factory.connct("host","port") ? like proxy = {http:'http://proxy:port'} or socks proxy stuff
and use it to join server instead local machine

I read the class ClientFactory inside the module quarry.net.client but still confuse about this
image

Do i need to overwrite library for that or it build with itself ?

Here is example of default join code

from twisted.internet import defer, reactor
from quarry.net.client import ClientFactory, ClientProtocol
from quarry.net.auth import Profile
from quarry.net.auth import OfflineProfile

class ExampleClientProtocol(ClientProtocol):
    pass
class ExampleClientFactory(ClientFactory):
    protocol = ExampleClientProtocol

@defer.inlineCallbacks
def main():
    print("logging in...")
    # profile = yield Profile.from_credentials("Jimmy001")     #For online real official account
    profile = OfflineProfile("Jimmy")  # For offline account
    factory = ExampleClientFactory(profile)
    print("connecting...")
    factory = yield factory.connect("localhost", 25565)
    print("connected!")


if __name__ == "__main__":
    main()
    reactor.run()
@davidawesome02
Copy link

  1. you can port forward that port and use the ip or get a domain.
  2. you can overwrite the library in location (too complex because diffrent verison) or you can import it from a folder just git clone and load it
  3. msg me on discord and I can try to explain more, but a proxy is prob not what you want (davidawesome01#3886)

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

No branches or pull requests

2 participants