File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717class Uniproxy :
1818 def __init__ (self , ip : str , port : int ):
19- self .ip_address = ip
20- self .port = port
21- self .proxy = self .__get_proxy_instance ()
19+ self ._ip_address = ip
20+ self ._port = port
21+ self .proxy = self .__get_proxy_instance ()
2222 if not self .__check_connection ():
2323 warnings .warn ("Unable to bind to the specified IP and Port.\n Please check if the IP and Port are correct\n and port is not already in use." )
2424
25+ @property
26+ def ip_address (self ):
27+ return self ._ip_address
28+
29+ @ip_address .setter
30+ def ip_address (self , value ):
31+ self ._ip_address = value
32+ if hasattr (self , 'proxy' ):
33+ self .proxy .ip_address = value
34+
35+ @property
36+ def port (self ):
37+ return self ._port
38+
39+ @port .setter
40+ def port (self , value ):
41+ self ._port = value
42+ if hasattr (self , 'proxy' ):
43+ self .proxy .port = value
44+
2545 def __check_connection (self ):
2646 try :
2747 s = socket .socket (socket .AF_INET , socket .SOCK_STREAM )
You can’t perform that action at this time.
0 commit comments