Exemple #1
0
 def link(self, ip, port, tls):
     if tls == "tls":
         return ColorStr.red("HTTPS的Socks5不支持tg的分享连接. 请自行配合设置BifrostV等软件使用")
     else:
         return ColorStr.green(
             "tg://socks?server={0}&port={1}&user={2}&pass={3}".format(
                 ip, port, self.user_info, self.password))
Exemple #2
0
 def link(self, ip, port, tls):
     json_dict = {
         "v": "2",
         "ps": "",
         "add": ip,
         "port": port,
         "aid": self.alter_id,
         "type": self.header,
         "net": self.network,
         "path": self.path,
         "host": self.host,
         "id": self.password,
         "tls": tls
     }
     json_data = json.dumps(json_dict)
     result_link = "vmess://{}".format(
         bytes.decode(base64.b64encode(bytes(
             json_data, 'utf-8')))) if self.network != 'quic' else ''
     return ColorStr.green(result_link)
Exemple #3
0
 def link(self, ip, port, tls):
     return ColorStr.green(
         "tg://proxy?server={0}&port={1}&secret={2}".format(
             ip, port, self.password))
Exemple #4
0
 def link(self, ip, port, tls):
     ss_origin_url = "{0}:{1}@{2}:{3}".format(self.method, self.password,
                                              ip, port)
     return ColorStr.green("ss://{}".format(
         bytes.decode(base64.b64encode(bytes(ss_origin_url, 'utf-8')))))