mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
clang format changed file
This commit is contained in:
parent
518f672bbe
commit
c3d93e3c2d
@ -90,13 +90,13 @@ namespace Qv2ray::base::config
|
|||||||
: listenip("127.0.0.1"), setSystemProxy(true), useSocks(true), socks_port(1088), socks_useAuth(false), socksUDP(true),
|
: listenip("127.0.0.1"), setSystemProxy(true), useSocks(true), socks_port(1088), socks_useAuth(false), socksUDP(true),
|
||||||
socksLocalIP("127.0.0.1"), socksAccount(), useHTTP(true), http_port(8888), http_useAuth(false), httpAccount(), useTPROXY(false),
|
socksLocalIP("127.0.0.1"), socksAccount(), useHTTP(true), http_port(8888), http_useAuth(false), httpAccount(), useTPROXY(false),
|
||||||
tproxy_ip("127.0.0.1"), tproxy_port(12345), tproxy_use_tcp(true), tproxy_use_udp(false), tproxy_followRedirect(true),
|
tproxy_ip("127.0.0.1"), tproxy_port(12345), tproxy_use_tcp(true), tproxy_use_udp(false), tproxy_followRedirect(true),
|
||||||
tproxy_mode("tproxy"),dnsIntercept(true)
|
tproxy_mode("tproxy"), dnsIntercept(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
XTOSTRUCT(O(setSystemProxy, listenip, useSocks, useHTTP, socks_port, socks_useAuth, socksAccount, socksUDP, socksLocalIP, http_port,
|
XTOSTRUCT(O(setSystemProxy, listenip, useSocks, useHTTP, socks_port, socks_useAuth, socksAccount, socksUDP, socksLocalIP, http_port,
|
||||||
http_useAuth, httpAccount, useTPROXY, tproxy_ip, tproxy_port, tproxy_use_tcp, tproxy_use_udp, tproxy_followRedirect,
|
http_useAuth, httpAccount, useTPROXY, tproxy_ip, tproxy_port, tproxy_use_tcp, tproxy_use_udp, tproxy_followRedirect,
|
||||||
tproxy_mode,dnsIntercept))
|
tproxy_mode, dnsIntercept))
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Qv2rayOutboundsConfig
|
struct Qv2rayOutboundsConfig
|
||||||
|
@ -515,7 +515,8 @@ namespace Qv2ray::core::connection
|
|||||||
{
|
{
|
||||||
OutboundMarkSettingFilter(GlobalConfig.outboundConfig.mark, root);
|
OutboundMarkSettingFilter(GlobalConfig.outboundConfig.mark, root);
|
||||||
}
|
}
|
||||||
if (GlobalConfig.inboundConfig.useTPROXY && GlobalConfig.inboundConfig.dnsIntercept){
|
if (GlobalConfig.inboundConfig.useTPROXY && GlobalConfig.inboundConfig.dnsIntercept)
|
||||||
|
{
|
||||||
DNSInterceptFilter(root);
|
DNSInterceptFilter(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -602,22 +603,22 @@ namespace Qv2ray::core::connection
|
|||||||
root["outbounds"] = outbounds;
|
root["outbounds"] = outbounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DNSInterceptFilter(CONFIGROOT &root){
|
void DNSInterceptFilter(CONFIGROOT &root)
|
||||||
|
{
|
||||||
// dns outBound
|
// dns outBound
|
||||||
QJsonObject dnsOutboundObj{{"protocol","dns"},{"tag","dns-out"}};
|
QJsonObject dnsOutboundObj{ { "protocol", "dns" }, { "tag", "dns-out" } };
|
||||||
OUTBOUNDS outbounds(root["outbounds"].toArray());
|
OUTBOUNDS outbounds(root["outbounds"].toArray());
|
||||||
outbounds.append(dnsOutboundObj);
|
outbounds.append(dnsOutboundObj);
|
||||||
root["outbounds"] = outbounds;
|
root["outbounds"] = outbounds;
|
||||||
|
|
||||||
//dns route
|
// dns route
|
||||||
QJsonObject dnsRoutingRuleObj{{"outboundTag", "dns-out"},{"port","53"},{"type", "field"}};
|
QJsonObject dnsRoutingRuleObj{ { "outboundTag", "dns-out" }, { "port", "53" }, { "type", "field" } };
|
||||||
ROUTING routing(root["routing"].toObject());
|
ROUTING routing(root["routing"].toObject());
|
||||||
QJsonArray _rules(routing["rules"].toArray());
|
QJsonArray _rules(routing["rules"].toArray());
|
||||||
_rules.insert(0,dnsRoutingRuleObj);
|
_rules.insert(0, dnsRoutingRuleObj);
|
||||||
routing["rules"]=_rules;
|
routing["rules"] = _rules;
|
||||||
root["routing"]=routing;
|
root["routing"] = routing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Generation
|
} // namespace Generation
|
||||||
} // namespace Qv2ray::core::connection
|
} // namespace Qv2ray::core::connection
|
||||||
|
@ -1261,13 +1261,11 @@ void PreferencesWindow::on_jumpListCountSB_valueChanged(int arg1)
|
|||||||
void PreferencesWindow::on_outboundMark_valueChanged(int arg1)
|
void PreferencesWindow::on_outboundMark_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
NEEDRESTART
|
NEEDRESTART
|
||||||
CurrentConfig.outboundConfig.mark=arg1;
|
CurrentConfig.outboundConfig.mark = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PreferencesWindow::on_dnsIntercept_toggled(bool checked)
|
void PreferencesWindow::on_dnsIntercept_toggled(bool checked)
|
||||||
{
|
{
|
||||||
NEEDRESTART
|
NEEDRESTART
|
||||||
CurrentConfig.inboundConfig.dnsIntercept=checked;
|
CurrentConfig.inboundConfig.dnsIntercept = checked;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ class PreferencesWindow
|
|||||||
|
|
||||||
void on_dnsIntercept_toggled(bool checked);
|
void on_dnsIntercept_toggled(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//
|
//
|
||||||
RouteSettingsMatrixWidget *routeSettingsWidget;
|
RouteSettingsMatrixWidget *routeSettingsWidget;
|
||||||
void SetAutoStartButtonsState(bool isAutoStart);
|
void SetAutoStartButtonsState(bool isAutoStart);
|
||||||
|
Loading…
Reference in New Issue
Block a user