Tecnativa / docker-whitelist

A socat service to whitelist network connections
Apache License 2.0
8 stars 8 forks source link

fix: pin to python 3.10 #16

Closed dnplkndll closed 10 months ago

dnplkndll commented 11 months ago

pinned and running on arm but DeprecationWarning(s):

/usr/local/bin/proxy:21: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead
  ip = random.choice([answer.address for answer in resolver.query(target)])
INFO:root:Resolved google.com to 142.250.190.110
/usr/local/bin/proxy:26: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  async def netcat(port):
INFO:root:Executing: socat tcp-listen:80,fork,reuseaddr,max-children=100 tcp-connect:142.250.190.110:80
INFO:root:Executing: socat tcp-listen:443,fork,reuseaddr,max-children=100 tcp-connect:142.250.190.110:443
pedrobaeza commented 11 months ago

I think you can change the resolve deprecation and the coroutine thing, explaining both on the commit message, and it's good to go.

pedrobaeza commented 11 months ago

You can put both changes in the same commits, as they are related and the deprecation won't appear if sticking to other Python versions. Please add also the resolve one.

pedrobaeza commented 10 months ago

Fixed in #18