Example #1
0
 def alter_index(self, index):
     if Dealdata.is_int(index):
         i = int(index)
         if i >= 0 and i < len(self.data['vmess']):
             self.data['index'] = int(index)
             return True
     return False
Example #2
0
 def set_local_port(self, port):
     if Dealdata.is_int(port):
         self.inbound.set_port(int(port))
         self.save()