From e48d8ed98b5a138ac8d58d8c5067f42bd1b058ee Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 9 Dec 2022 18:26:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Add=20warning=20about=20https=20?= =?UTF-8?q?proxy=20subjects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/App/Base.lproj/Main.storyboard | 27 +++++++++++--------- phpmon/Domain/DomainList/AddProxyVC.swift | 10 ++++++-- phpmon/Localizable.strings | 3 +++ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/phpmon/Domain/App/Base.lproj/Main.storyboard b/phpmon/Domain/App/Base.lproj/Main.storyboard index 89132db..d7aa2aa 100644 --- a/phpmon/Domain/App/Base.lproj/Main.storyboard +++ b/phpmon/Domain/App/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -1112,17 +1112,17 @@ Gw - + - + - + - + @@ -1149,7 +1149,7 @@ Gw - + @@ -1176,7 +1176,7 @@ Gw - + + + + @@ -1223,7 +1226,7 @@ Gw - + @@ -1239,7 +1242,7 @@ Gw - + diff --git a/phpmon/Domain/DomainList/AddProxyVC.swift b/phpmon/Domain/DomainList/AddProxyVC.swift index bd93779..5ea773d 100644 --- a/phpmon/Domain/DomainList/AddProxyVC.swift +++ b/phpmon/Domain/DomainList/AddProxyVC.swift @@ -157,8 +157,14 @@ class AddProxyVC: NSViewController, NSTextFieldDelegate { return } - previewText.stringValue = "domain_list.add.proxy_available" - .localized( + var translationKey = "domain_list.add.proxy_available" + + if inputProxySubject.stringValue.starts(with: "https://") { + translationKey = "domain_list.add.proxy_https_warning" + } + + previewText.stringValue = + translationKey.localized( inputProxySubject.stringValue, buttonSecure.state == .on ? "https" : "http", inputDomainName.stringValue, diff --git a/phpmon/Localizable.strings b/phpmon/Localizable.strings index e81d050..fcb07d5 100644 --- a/phpmon/Localizable.strings +++ b/phpmon/Localizable.strings @@ -139,6 +139,9 @@ "domain_list.add.domain_name" = "Domain name"; "domain_list.add.create_proxy" = "Create Proxy"; "domain_list.add.proxy_available" = "%@ will be proxied and will be available via: %@://%@.%@"; +"domain_list.add.proxy_https_warning" = "%@ will be proxied and will be available via: %@://%@.%@. + +(!) IMPORTANT: This proxy may not work until you manually add `proxy_ssl_verify off;` to the nginx configuration file for this domain. It is recommended that you use an unsecured domain as the proxy subject."; // ADD SITE TO DOMAINS LIST