-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support reality #1710
base: dev
Are you sure you want to change the base?
support reality #1710
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,6 @@ namespace Qv2ray::core::config | |
{ | ||
// Use the config path found by the checks above | ||
SetConfigDirPath(configPath); | ||
LOG("Using ", QV2RAY_CONFIG_DIR, " as the config path."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a good reason for removing this line? |
||
} | ||
else | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,14 @@ void StreamSettingsWidget::SetStreamObject(const StreamSettingsObject &sso) | |
{ | ||
stream = sso; | ||
transportCombo->setCurrentText(stream.network); | ||
// TLS XTLS | ||
const auto security = stream.security; | ||
// TLS XTLS REALITY | ||
{ | ||
const static QMap<QString, int> securityIndexMap{ { "none", 0 }, { "tls", 1 }, { "xtls", 2 } }; | ||
if (securityIndexMap.contains(stream.security)) | ||
securityTypeCB->setCurrentIndex(securityIndexMap[stream.security]); | ||
const static QMap<QString, int> securityIndexMap{ { "none", 0 }, { "tls", 1 }, { "xtls", 2 }, { "reality", 3 } }; | ||
if (securityIndexMap.contains(security)) | ||
securityTypeCB->setCurrentIndex(securityIndexMap[security]); | ||
else | ||
LOG("Unsupported Security Type:", stream.security); | ||
LOG("Unsupported Security Type:", security); | ||
|
||
#define tls_xtls_process(prefix) \ | ||
{ \ | ||
|
@@ -50,10 +51,25 @@ void StreamSettingsWidget::SetStreamObject(const StreamSettingsObject &sso) | |
alpnTxt->setText(stream.prefix##Settings.alpn.join("|")); \ | ||
} | ||
|
||
#define reality_porcess(prefix) \ | ||
{ \ | ||
serverNameTxt->setText(stream.prefix##Settings.serverName); \ | ||
allowInsecureCB->setChecked(stream.prefix##Settings.allowInsecure); \ | ||
enableSessionResumptionCB->setChecked(stream.prefix##Settings.enableSessionResumption); \ | ||
disableSystemRoot->setChecked(stream.prefix##Settings.disableSystemRoot); \ | ||
printDebugLog->setChecked(stream.prefix##Settings.show); \ | ||
fingerprint->setText(stream.prefix##Settings.fingerprint); \ | ||
publicKey->setText(stream.prefix##Settings.publicKey); \ | ||
shortId->setText(stream.prefix##Settings.shortId); \ | ||
spiderX->setText(stream.prefix##Settings.spiderX); \ | ||
} | ||
|
||
tls_xtls_process(tls); | ||
|
||
if (stream.security == "xtls") | ||
tls_xtls_process(xtls); | ||
if (stream.security == "reality") | ||
reality_porcess(reality) | ||
} | ||
// TCP | ||
{ | ||
|
@@ -326,6 +342,7 @@ void StreamSettingsWidget::on_disableSystemRoot_stateChanged(int arg1) | |
{ | ||
stream.tlsSettings.disableSystemRoot = arg1; | ||
stream.xtlsSettings.disableSystemRoot = arg1; | ||
stream.realitySettings.disableSystemRoot = arg1; | ||
} | ||
|
||
void StreamSettingsWidget::on_openCertEditorBtn_clicked() | ||
|
@@ -393,3 +410,25 @@ void StreamSettingsWidget::on_httpHeadersEditBtn_clicked() | |
json["headers"] = rJson; | ||
stream.httpSettings.headers = HttpObject::fromJson(json).headers; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems that you didn't format your codebase with clang-format, please consider doing so. |
||
|
||
void StreamSettingsWidget::on_printDebugLog_stateChanged(int arg1) | ||
{ | ||
stream.realitySettings.show = arg1; | ||
} | ||
void StreamSettingsWidget::on_fingerprint_textEdited(const QString &arg1) | ||
{ | ||
stream.realitySettings.fingerprint = arg1; | ||
} | ||
void StreamSettingsWidget::on_publicKey_textEdited(const QString &arg1) | ||
{ | ||
stream.realitySettings.publicKey = arg1; | ||
} | ||
void StreamSettingsWidget::on_shortId_textEdited(const QString &arg1) | ||
{ | ||
stream.realitySettings.shortId = arg1; | ||
} | ||
void StreamSettingsWidget::on_spiderX_textEdited(const QString &arg1) | ||
{ | ||
stream.realitySettings.spiderX = arg1; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, add a newline before EOF |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,8 @@ void MainWindow::MWSetSystemProxy() | |
LOG("ProxyAddress: " + proxyAddress); | ||
LOG("HTTP Port: " + QSTRN(httpPort)); | ||
LOG("SOCKS Port: " + QSTRN(socksPort)); | ||
SetSystemProxy(proxyAddress, httpPort, socksPort); | ||
// If you need to automatically set up the system proxy function,you can enable the handle commented out below | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not related to REALITY, please consider removing it from the PR |
||
// SetSystemProxy(proxyAddress, httpPort, socksPort); | ||
qvAppTrayIcon->setIcon(Q_TRAYICON("tray-systemproxy")); | ||
if (!GlobalConfig.uiConfig.quietMode) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3292,6 +3292,31 @@ Maybe you have downloaded the wrong core?</source> | |
<source>TCP Keepalive Interval</source> | ||
<translation>TCP保留存活间隔</translation> | ||
</message> | ||
<message> | ||
<source>REALITY Options</source> | ||
<translation>REALITY 设置</translation> | ||
</message> | ||
|
||
<message> | ||
<source>Print debug log</source> | ||
<translation>打印调试信息</translation> | ||
</message> | ||
<message> | ||
<source>Fingerprint</source> | ||
<translation>指纹模拟</translation> | ||
</message> | ||
<message> | ||
<source>Svr public key</source> | ||
<translation>服务器公钥</translation> | ||
</message> | ||
<message> | ||
<source>Short id</source> | ||
<translation>短ID(不一定支持)</translation> | ||
</message> | ||
<message> | ||
<source>SpiderX</source> | ||
<translation>初始路径(不一定支持)</translation> | ||
</message> | ||
Comment on lines
+3312
to
+3319
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. translations are done on https://crowdin.com/project/qv2ray |
||
</context> | ||
<context> | ||
<name>w_GroupManager</name> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?