bta-proxy/bta_proxy/__main__.py

22 lines
496 B
Python

# x-run: cd .. && python -m bta_proxy '201:4f8c:4ea:0:71ec:6d7:6f1b:a4f9'
import asyncio
from argparse import ArgumentParser
from sys import argv
from bta_proxy.proxy import BTAProxy
MAX_SIZE = 0x400000
async def main(args):
loop = asyncio.get_running_loop()
server = await asyncio.start_server(BTAProxy(args[0], 25565, loop).handle_client, "localhost", 25565)
async with server:
await server.serve_forever()
if __name__ == '__main__':
asyncio.run(main(argv[1:]))