def get_vmesslinks(self, key='all'): d, _ = Dealdata.cut_data(data(self.outbound)['vmess'], key) vmesslinks = [{ 'remarks': x['remarks'], 'link': node2vmesslink(x) } for x in d] return vmesslinks, Dealdata.praseindex(key)
def get_router(self, key, mode): if mode == 1: r = data(self.router)['direct']['ip'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key) elif mode == 2: r = data(self.router)['direct']['domain'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key) elif mode == 3: r = data(self.router)['proxy']['ip'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key) elif mode == 4: r = data(self.router)['proxy']['domain'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key) elif mode == 5: r = data(self.router)['block']['ip'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key) elif mode == 6: r = data(self.router)['block']['domain'] d, _ = Dealdata.cut_data(r, key) return d, Dealdata.praseindex(key)
def get_router_block_domain(self, key='all'): d, _ = Dealdata.cut_data(data(self.router)['block']['domain'], key) return d, Dealdata.praseindex(key)
def get_router_direct_ip(self, key='all'): d, _ = Dealdata.cut_data(data(self.router)['direct']['ip'], key) return d, Dealdata.praseindex(key)
def get_router_proxy_ip(self, key='all'): d, _ = Dealdata.cut_data(data(self.router)['proxy']['ip'], key) return d, Dealdata.praseindex(key)
def get_dns(self, key='all'): d, _ = Dealdata.cut_data(data(self.dns), key) return d, Dealdata.praseindex(key)
def get_sub(self, key='all'): d, _ = Dealdata.cut_data(data(self.outbound)['sub'], key) return d, Dealdata.praseindex(key)
def get_node(self, key='all'): d, _ = Dealdata.cut_data(data(self.outbound)['vmess'], key) return d, Dealdata.praseindex(key)
def get_router_block_ip(self, key='all'): d, _ = Dealdata.cut_data(data(self.router)['block']['ip'], key) return d, Dealdata.praseindex(key)[:len(d)]