Python Config.MANAGE_PASS Examples

The following are 7 code examples of Config.MANAGE_PASS(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module Config , or try the search function .
Example #1
Source File: asyncmgr.py    From shadowsocksR-b with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2]) 
Example #2
Source File: asyncmgr.py    From ssr-ml with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2]) 
Example #3
Source File: asyncmgr.py    From shadowsocks with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        # manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance(
                ).new_server(args[1], args[2]) 
Example #4
Source File: asyncmgr.py    From Dockerfiles with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2]) 
Example #5
Source File: asyncmgr.py    From SSRSpeed with GNU General Public License v3.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2]) 
Example #6
Source File: asyncmgr.py    From ssrr with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2]) 
Example #7
Source File: asyncmgr.py    From shadowsocksr-python with Apache License 2.0 5 votes vote down vote up
def _handle_data(self, sock):
        data, addr = sock.recvfrom(128)
        #manage pwd:port:passwd:action
        args = data.split(':')
        if len(args) < 4:
            return
        if args[0] == Config.MANAGE_PASS:
            if args[3] == '0':
                server_pool.ServerPool.get_instance().cb_del_server(args[1])
            elif args[3] == '1':
                server_pool.ServerPool.get_instance().new_server(args[1], args[2])