Exemplo n.º 1
0
 def hosts(host_str):
     if host_str == "*":
         if has_dual_stack():
             #IPv6 will also listen for IPv4:
             return ["::"]
         #no dual stack, so we have to listen on both IPv4 and IPv6 explicitly:
         return ["0.0.0.0", "::"]
     return [host_str]
Exemplo n.º 2
0
def hosts(host_str):
    if host_str == "*":
        from xpra.server.socket_util import has_dual_stack
        if has_dual_stack():
            #IPv6 will also listen for IPv4:
            return ["::"]
        #no dual stack, so we have to listen on both IPv4 and IPv6 explicitly:
        return ["0.0.0.0", "::"]
    return [host_str]