Skip to content

How to specify the network interface used in our proxy? #1416

Answered by LoickZoty
LoickZoty asked this question in Q&A
Discussion options

You must be logged in to vote

The response:

You needed to set the port to '0' so that the machine could choose a random port. Otherwise, multiple sockets would be created with the specified port, causing an error!

def resolve_dns(self, host: str, port: int) -> Tuple[Optional[str], Optional['HostPort']]:
    return None, ("192.168.1.150", 0)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LoickZoty
Comment options

@LoickZoty
Comment options

Answer selected by LoickZoty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants