mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Add HTTP single link support with Telegram-link-liked format
Optimize codes.
This commit is contained in:
4 files changed
+33
-26
No files matched your search
+2
-2
@@ -190,13 +190,13 @@ std::string socksConstruct(std::string remarks, std::string server, std::string
|
||||
return sb.GetString();
|
||||
}
|
||||
|
||||
std::string httpConstruct(std::string remarks, std::string server, std::string port, std::string username, std::string password)
|
||||
std::string httpConstruct(std::string remarks, std::string server, std::string port, std::string username, std::string password, bool tls)
|
||||
{
|
||||
rapidjson::StringBuffer sb;
|
||||
rapidjson::Writer<rapidjson::StringBuffer> writer(sb);
|
||||
writer.StartObject();
|
||||
writer.Key("Type");
|
||||
writer.String("HTTP");
|
||||
writer.String(tls ? "HTTPS" : "HTTP");
|
||||
writer.Key("Remark");
|
||||
writer.String(remarks.data());
|
||||
writer.Key("Hostname");
|
||||
|
||||
Reference in new issue
Block a user