mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-22 19:49:34 +00:00
Merge pull request #3089
0fcaadae
main: command line option for socks5 proxy (selsta)
This commit is contained in:
commit
22386aa7e1
3 changed files with 13 additions and 6 deletions
7
main.qml
7
main.qml
|
@ -1427,13 +1427,14 @@ ApplicationWindow {
|
|||
property string proxyAddress: "127.0.0.1:9050"
|
||||
property bool proxyEnabled: isTails
|
||||
function getProxyAddress() {
|
||||
if (!proxyEnabled) {
|
||||
if ((socksProxyFlagSet && socksProxyFlag == "") || !proxyEnabled) {
|
||||
return "";
|
||||
}
|
||||
if (proxyAddress == "") {
|
||||
var proxyAddressSetOrForced = socksProxyFlagSet ? socksProxyFlag : proxyAddress;
|
||||
if (proxyAddressSetOrForced == "") {
|
||||
return "127.0.0.1:0";
|
||||
}
|
||||
return proxyAddress;
|
||||
return proxyAddressSetOrForced;
|
||||
}
|
||||
function getWalletProxyAddress() {
|
||||
if (!useRemoteNode) {
|
||||
|
|
|
@ -254,7 +254,8 @@ Rectangle {
|
|||
MoneroComponents.CheckBox {
|
||||
id: proxyCheckbox
|
||||
Layout.topMargin: 6
|
||||
checked: persistentSettings.proxyEnabled
|
||||
enabled: !socksProxyFlagSet
|
||||
checked: socksProxyFlagSet ? socksProxyFlag : persistentSettings.proxyEnabled
|
||||
onClicked: {
|
||||
persistentSettings.proxyEnabled = !persistentSettings.proxyEnabled;
|
||||
}
|
||||
|
@ -265,16 +266,17 @@ Rectangle {
|
|||
|
||||
MoneroComponents.RemoteNodeEdit {
|
||||
id: proxyEdit
|
||||
enabled: proxyCheckbox.enabled
|
||||
Layout.leftMargin: 36
|
||||
Layout.topMargin: 6
|
||||
Layout.minimumWidth: 100
|
||||
placeholderFontSize: 15
|
||||
visible: persistentSettings.proxyEnabled
|
||||
visible: proxyCheckbox.checked
|
||||
|
||||
daemonAddrLabelText: qsTr("IP address") + translationManager.emptyString
|
||||
daemonPortLabelText: qsTr("Port") + translationManager.emptyString
|
||||
|
||||
initialAddress: persistentSettings.proxyAddress
|
||||
initialAddress: socksProxyFlagSet ? socksProxyFlag : persistentSettings.proxyAddress
|
||||
onEditingFinished: {
|
||||
persistentSettings.proxyAddress = proxyEdit.getAddress();
|
||||
}
|
||||
|
|
|
@ -256,6 +256,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||
|
||||
QCommandLineOption disableCheckUpdatesOption("disable-check-updates", "Disable automatic check for updates.");
|
||||
parser.addOption(disableCheckUpdatesOption);
|
||||
QCommandLineOption socksProxyOption("socks5-proxy", "Enable socks5 proxy. Used for remote node connection (advanced mode), updates downloading and fetching price sources.", "address:port");
|
||||
parser.addOption(socksProxyOption);
|
||||
QCommandLineOption testQmlOption("test-qml");
|
||||
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
parser.addOption(logPathOption);
|
||||
|
@ -483,6 +485,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
|
||||
engine.rootContext()->setContextProperty("idealThreadCount", QThread::idealThreadCount());
|
||||
engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", parser.isSet(disableCheckUpdatesOption));
|
||||
engine.rootContext()->setContextProperty("socksProxyFlag", parser.value(socksProxyOption));
|
||||
engine.rootContext()->setContextProperty("socksProxyFlagSet", parser.isSet(socksProxyOption));
|
||||
|
||||
bool builtWithScanner = false;
|
||||
#ifdef WITH_SCANNER
|
||||
|
|
Loading…
Reference in a new issue