Skip to content

Commit

Permalink
Added IPv6 support (#73)
Browse files Browse the repository at this point in the history
* Added IPv6 support

* Updated docker images to IPv6 usage

* Reverted commented entry point from testing. Sry.
  • Loading branch information
simonmicro committed Jul 8, 2020
1 parent 3d203cb commit 9d9a363
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/docker-py3-kms-minimal/Dockerfile
Expand Up @@ -2,7 +2,7 @@

FROM alpine:3.8

ENV IP 0.0.0.0
ENV IP ::
ENV PORT 1688
ENV EPID ""
ENV LCID 1033
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-py3-kms/Dockerfile
Expand Up @@ -9,8 +9,8 @@ FROM alpine:3.8

# EN: IP-address
# RU: IP-адрес
ENV IP 0.0.0.0
# The IP address to listen on. The default is "0.0.0.0" (all interfaces).
ENV IP ::
# The IP address to listen on. The default is "::" (all interfaces).

# EN: TCP-port
# RU: TCP-порт
Expand Down Expand Up @@ -115,4 +115,4 @@ WORKDIR /home/py-kms
EXPOSE ${PORT}/tcp

# Entry point
ENTRYPOINT ["/usr/bin/start.sh"]
ENTRYPOINT ["/usr/bin/start.sh"]
1 change: 1 addition & 0 deletions py-kms/pykms_Server.py
Expand Up @@ -36,6 +36,7 @@ class KeyServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
allow_reuse_address = True

def __init__(self, server_address, RequestHandlerClass):
self.address_family = socket.AF_INET6 # This call make sure the server creates an IPv6 socket and NOT an IPv4 by default
socketserver.TCPServer.__init__(self, server_address, RequestHandlerClass)
self.__shutdown_request = False
self.r_service, self.w_service = os.pipe()
Expand Down

0 comments on commit 9d9a363

Please sign in to comment.