Merge branch 'add-proxy-pac'

This commit is contained in:
Davide De Rosa 2021-01-26 20:21:08 +01:00
commit 990ba27926
4 changed files with 142 additions and 68 deletions

View File

@ -841,15 +841,15 @@ DQ
<scene sceneID="lCI-lq-aRn">
<objects>
<viewController title="PROXY" id="GKB-5a-YDj" userLabel="PROXY" customClass="ProxyViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="0vU-UL-a3L">
<view key="view" misplaced="YES" id="0vU-UL-a3L">
<rect key="frame" x="0.0" y="0.0" width="520" height="261"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="qqg-dj-Man">
<rect key="frame" x="0.0" y="20" width="500" height="221"/>
<rect key="frame" x="0.0" y="20" width="500" height="248"/>
<subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vnw-dm-nrd">
<rect key="frame" x="147" y="197" width="247" height="25"/>
<rect key="frame" x="147" y="224" width="247" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="FDY-1Y-fD8"/>
</constraints>
@ -868,77 +868,140 @@ DQ
<action selector="pickChoice:" target="GKB-5a-YDj" id="Vgj-M1-c40"/>
</connections>
</popUpButton>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="lIW-gM-F4p">
<rect key="frame" x="0.0" y="0.0" width="500" height="191"/>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3mV-87-Odw">
<rect key="frame" x="0.0" y="0.0" width="500" height="218"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1lz-QY-I4a">
<rect key="frame" x="-2" y="173" width="144" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="ADDR" id="YDY-1u-h1f">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="agk-kA-yKN">
<rect key="frame" x="150" y="170" width="130" height="21"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="tWj-MW-BEZ">
<rect key="frame" x="0.0" y="197" width="500" height="21"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1lz-QY-I4a">
<rect key="frame" x="-2" y="3" width="144" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="ADDR" id="YDY-1u-h1f">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="agk-kA-yKN">
<rect key="frame" x="150" y="0.0" width="130" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="7Ec-rg-RBm"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="255.255.255.255" drawsBackground="YES" id="CEb-vF-MtI">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<outlet property="delegate" destination="GKB-5a-YDj" id="or1-Dx-13y"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aOI-Xp-liP">
<rect key="frame" x="280" y="0.0" width="60" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="cCA-F4-gRF"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="65535" drawsBackground="YES" id="Y5V-uz-E4D">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<outlet property="delegate" destination="GKB-5a-YDj" id="GOT-Tf-PJ2"/>
</connections>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="130" id="7Ec-rg-RBm"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="top" secondItem="tWj-MW-BEZ" secondAttribute="top" id="0vg-T8-GQR"/>
<constraint firstItem="1lz-QY-I4a" firstAttribute="leading" secondItem="tWj-MW-BEZ" secondAttribute="leading" id="1T4-CC-uu7"/>
<constraint firstItem="aOI-Xp-liP" firstAttribute="leading" secondItem="agk-kA-yKN" secondAttribute="trailing" id="6vt-mB-Xhq"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="aOI-Xp-liP" secondAttribute="trailing" id="DMl-7j-KXV"/>
<constraint firstItem="aOI-Xp-liP" firstAttribute="centerY" secondItem="agk-kA-yKN" secondAttribute="centerY" id="GqT-cN-tM8"/>
<constraint firstItem="1lz-QY-I4a" firstAttribute="centerY" secondItem="agk-kA-yKN" secondAttribute="centerY" id="k54-yc-nlu"/>
<constraint firstAttribute="bottom" secondItem="agk-kA-yKN" secondAttribute="bottom" id="snC-1Z-lN8"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="leading" secondItem="1lz-QY-I4a" secondAttribute="trailing" constant="10" id="wtb-VQ-9g1"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="255.255.255.255" drawsBackground="YES" id="CEb-vF-MtI">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<outlet property="delegate" destination="GKB-5a-YDj" id="or1-Dx-13y"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aOI-Xp-liP">
<rect key="frame" x="280" y="170" width="60" height="21"/>
</customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="05W-SY-nBT">
<rect key="frame" x="0.0" y="168" width="500" height="21"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rfk-wd-ga6">
<rect key="frame" x="-2" y="3" width="144" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="PAC" id="qRf-g6-q2o">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nI3-NZ-lhx">
<rect key="frame" x="150" y="0.0" width="350" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="http://" drawsBackground="YES" id="ACk-Rx-UfP">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<outlet property="delegate" destination="GKB-5a-YDj" id="xWZ-Zl-mke"/>
</connections>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="60" id="cCA-F4-gRF"/>
<constraint firstItem="nI3-NZ-lhx" firstAttribute="leading" secondItem="rfk-wd-ga6" secondAttribute="trailing" constant="10" id="F3J-CD-5P0"/>
<constraint firstItem="nI3-NZ-lhx" firstAttribute="top" secondItem="05W-SY-nBT" secondAttribute="top" id="MZB-Ad-wlv"/>
<constraint firstItem="rfk-wd-ga6" firstAttribute="centerY" secondItem="nI3-NZ-lhx" secondAttribute="centerY" id="Nse-If-ETf"/>
<constraint firstAttribute="trailing" secondItem="nI3-NZ-lhx" secondAttribute="trailing" id="iro-wk-mXF"/>
<constraint firstItem="rfk-wd-ga6" firstAttribute="leading" secondItem="05W-SY-nBT" secondAttribute="leading" id="mtB-EX-7Qn"/>
<constraint firstAttribute="bottom" secondItem="nI3-NZ-lhx" secondAttribute="bottom" id="os3-8Y-l1x"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="65535" drawsBackground="YES" id="Y5V-uz-E4D">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<outlet property="delegate" destination="GKB-5a-YDj" id="GOT-Tf-PJ2"/>
</connections>
</textField>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="OXH-cq-bhS">
<rect key="frame" x="150" y="0.0" width="350" height="160"/>
</customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="lIW-gM-F4p">
<rect key="frame" x="0.0" y="0.0" width="500" height="160"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="OXH-cq-bhS">
<rect key="frame" x="150" y="0.0" width="350" height="160"/>
<constraints>
<constraint firstAttribute="height" constant="160" id="roN-ro-2td"/>
</constraints>
</customView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="160" id="roN-ro-2td"/>
<constraint firstAttribute="bottom" secondItem="OXH-cq-bhS" secondAttribute="bottom" id="7z0-Rw-lxr"/>
<constraint firstAttribute="trailing" secondItem="OXH-cq-bhS" secondAttribute="trailing" id="JjH-ll-cjt"/>
<constraint firstItem="OXH-cq-bhS" firstAttribute="top" secondItem="lIW-gM-F4p" secondAttribute="top" id="dlE-3Z-t5f"/>
</constraints>
</customView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="OXH-cq-bhS" secondAttribute="bottom" id="7z0-Rw-lxr"/>
<constraint firstAttribute="trailing" secondItem="OXH-cq-bhS" secondAttribute="trailing" id="JjH-ll-cjt"/>
<constraint firstItem="aOI-Xp-liP" firstAttribute="leading" secondItem="agk-kA-yKN" secondAttribute="trailing" id="cjl-P3-BmH"/>
<constraint firstItem="1lz-QY-I4a" firstAttribute="centerY" secondItem="agk-kA-yKN" secondAttribute="centerY" id="dSC-V3-UgP"/>
<constraint firstItem="1lz-QY-I4a" firstAttribute="leading" secondItem="lIW-gM-F4p" secondAttribute="leading" id="eWc-gR-w9L"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="leading" secondItem="1lz-QY-I4a" secondAttribute="trailing" constant="10" id="gGZ-xb-LMf"/>
<constraint firstItem="aOI-Xp-liP" firstAttribute="centerY" secondItem="agk-kA-yKN" secondAttribute="centerY" id="gNL-y3-qh3"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="aOI-Xp-liP" secondAttribute="trailing" id="hbc-cX-NnL"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="top" secondItem="lIW-gM-F4p" secondAttribute="top" id="pa1-17-1tz"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="agk-kA-yKN" secondAttribute="trailing" id="qnW-IO-Ljl"/>
<constraint firstItem="OXH-cq-bhS" firstAttribute="top" secondItem="agk-kA-yKN" secondAttribute="bottom" constant="10" id="vfE-2L-BGW"/>
<constraint firstItem="OXH-cq-bhS" firstAttribute="leading" secondItem="agk-kA-yKN" secondAttribute="leading" id="ySu-zB-xcX"/>
<constraint firstAttribute="trailing" secondItem="tWj-MW-BEZ" secondAttribute="trailing" id="8hm-OP-AMJ"/>
<constraint firstItem="OXH-cq-bhS" firstAttribute="leading" secondItem="agk-kA-yKN" secondAttribute="leading" id="9d2-sd-Aau"/>
<constraint firstItem="tWj-MW-BEZ" firstAttribute="leading" secondItem="3mV-87-Odw" secondAttribute="leading" id="L62-SQ-ngq"/>
<constraint firstItem="tWj-MW-BEZ" firstAttribute="top" secondItem="3mV-87-Odw" secondAttribute="top" id="MsT-lY-mAK"/>
<constraint firstAttribute="bottom" secondItem="lIW-gM-F4p" secondAttribute="bottom" id="OxC-ah-XcI"/>
<constraint firstAttribute="trailing" secondItem="lIW-gM-F4p" secondAttribute="trailing" id="d9m-id-d4S"/>
<constraint firstAttribute="trailing" secondItem="05W-SY-nBT" secondAttribute="trailing" id="pOz-xh-2P0"/>
<constraint firstItem="nI3-NZ-lhx" firstAttribute="leading" secondItem="agk-kA-yKN" secondAttribute="leading" id="xwK-NG-dQq"/>
</constraints>
</customView>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="lIW-gM-F4p" secondAttribute="bottom" id="6jE-yl-iES"/>
<constraint firstItem="Vnw-dm-nrd" firstAttribute="top" secondItem="qqg-dj-Man" secondAttribute="top" id="9gA-AG-lMS"/>
<constraint firstItem="lIW-gM-F4p" firstAttribute="leading" secondItem="qqg-dj-Man" secondAttribute="leading" id="B5V-Mj-U8A"/>
<constraint firstItem="3mV-87-Odw" firstAttribute="leading" secondItem="qqg-dj-Man" secondAttribute="leading" id="9oC-Oo-SMw"/>
<constraint firstAttribute="trailing" secondItem="3mV-87-Odw" secondAttribute="trailing" id="QiD-bT-7n4"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Vnw-dm-nrd" secondAttribute="trailing" id="Rrd-DL-xT3"/>
<constraint firstAttribute="bottom" secondItem="Vnw-dm-nrd" secondAttribute="bottom" priority="250" id="ZkX-Fo-kl8"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="leading" secondItem="Vnw-dm-nrd" secondAttribute="leading" id="c7E-lN-RHw"/>
<constraint firstItem="lIW-gM-F4p" firstAttribute="top" secondItem="Vnw-dm-nrd" secondAttribute="bottom" constant="10" id="kSK-j0-Eig"/>
<constraint firstAttribute="trailing" secondItem="lIW-gM-F4p" secondAttribute="trailing" id="o4b-oC-rju"/>
<constraint firstAttribute="bottom" secondItem="3mV-87-Odw" secondAttribute="bottom" id="cMu-Jm-Zl1"/>
<constraint firstItem="agk-kA-yKN" firstAttribute="leading" secondItem="Vnw-dm-nrd" secondAttribute="leading" id="iLZ-6E-078"/>
<constraint firstItem="3mV-87-Odw" firstAttribute="top" secondItem="Vnw-dm-nrd" secondAttribute="bottom" constant="10" id="poK-LR-Sgw"/>
<constraint firstItem="Vnw-dm-nrd" firstAttribute="leading" secondItem="qqg-dj-Man" secondAttribute="leading" constant="150" id="uEZ-ho-gyn"/>
</constraints>
</customView>
@ -952,18 +1015,20 @@ DQ
</view>
<connections>
<outlet property="constraintChoiceBottom" destination="ZkX-Fo-kl8" id="KC2-KB-4oq"/>
<outlet property="constraintSettingsTop" destination="kSK-j0-Eig" id="2qY-Yy-08k"/>
<outlet property="constraintSettingsTop" destination="poK-LR-Sgw" id="CUq-FG-BkY"/>
<outlet property="labelPACCaption" destination="rfk-wd-ga6" id="qhK-yK-7G9"/>
<outlet property="labelProxyCaption" destination="1lz-QY-I4a" id="oO6-ZW-JNA"/>
<outlet property="popupChoice" destination="Vnw-dm-nrd" id="JGo-RJ-2Ai"/>
<outlet property="textPAC" destination="nI3-NZ-lhx" id="Rsv-bV-Aiz"/>
<outlet property="textProxyAddress" destination="agk-kA-yKN" id="2WJ-8v-kCy"/>
<outlet property="textProxyPort" destination="aOI-Xp-liP" id="5Wx-Ux-Fk2"/>
<outlet property="viewProxyBypass" destination="OXH-cq-bhS" id="m81-Wt-AtR"/>
<outlet property="viewSettings" destination="lIW-gM-F4p" id="PRX-JR-Qs8"/>
<outlet property="viewSettings" destination="3mV-87-Odw" id="p8F-UI-RYg"/>
</connections>
</viewController>
<customObject id="0pY-9A-x7h" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="219" y="1883"/>
<point key="canvasLocation" x="219" y="1947"/>
</scene>
<!--GW-->
<scene sceneID="kq7-Ug-Ed9">
@ -1332,14 +1397,14 @@ DQ
<objects>
<viewController title="MTU" id="0rP-u0-K0y" customClass="MTUViewController" customModule="Passepartout" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="fcz-Gl-uf2">
<rect key="frame" x="0.0" y="0.0" width="450" height="88"/>
<rect key="frame" x="0.0" y="0.0" width="450" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Oze-WK-Ypf">
<rect key="frame" x="0.0" y="20" width="450" height="48"/>
<rect key="frame" x="0.0" y="20" width="450" height="50"/>
<subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="igx-z2-4Gy">
<rect key="frame" x="147" y="24" width="247" height="25"/>
<rect key="frame" x="147" y="26" width="247" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="6og-t3-Efq"/>
</constraints>
@ -1402,7 +1467,7 @@ DQ
<constraints>
<constraint firstItem="RMv-8f-kkb" firstAttribute="trailing" secondItem="igx-z2-4Gy" secondAttribute="trailing" id="A61-71-dhv"/>
<constraint firstAttribute="bottom" secondItem="igx-z2-4Gy" secondAttribute="bottom" priority="250" id="Fdn-qt-eAb"/>
<constraint firstItem="RMv-8f-kkb" firstAttribute="top" secondItem="igx-z2-4Gy" secondAttribute="bottom" constant="8" symbolic="YES" id="dHc-tO-9Md"/>
<constraint firstItem="RMv-8f-kkb" firstAttribute="top" secondItem="igx-z2-4Gy" secondAttribute="bottom" constant="10" id="dHc-tO-9Md"/>
<constraint firstItem="RMv-8f-kkb" firstAttribute="leading" secondItem="Oze-WK-Ypf" secondAttribute="leading" id="fMe-d1-8TX"/>
<constraint firstItem="igx-z2-4Gy" firstAttribute="top" secondItem="Oze-WK-Ypf" secondAttribute="top" id="g6D-WW-lKQ"/>
<constraint firstItem="igx-z2-4Gy" firstAttribute="leading" secondItem="Oze-WK-Ypf" secondAttribute="leading" constant="150" id="kHB-Oo-a7J"/>

View File

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.15.0 Beta 2528 (2021-01-26)
## Unreleased
### Added
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Provider infrastructure selectors not reloaded on profile change.
- Missing PAC URL in proxy settings on macOS.
## 1.0.0 (2021-01-01)

View File

@ -30,7 +30,7 @@ import TunnelKit
class DNSViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var popupChoice: NSPopUpButton!
@IBOutlet private weak var viewSettings: NSView!
@IBOutlet private weak var viewSettings: NSStackView!
@IBOutlet private weak var textDNSCustom: NSTextField!

View File

@ -33,7 +33,7 @@ class ProxyViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var popupChoice: NSPopUpButton!
@IBOutlet private weak var viewSettings: NSView!
@IBOutlet private weak var viewSettings: NSStackView!
@IBOutlet private weak var labelProxyCaption: NSTextField!
@ -41,6 +41,10 @@ class ProxyViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var textProxyPort: NSTextField!
@IBOutlet private weak var labelPACCaption: NSTextField!
@IBOutlet private weak var textPAC: NSTextField!
@IBOutlet private weak var viewProxyBypass: NSView!
@IBOutlet private var constraintChoiceBottom: NSLayoutConstraint!
@ -69,6 +73,8 @@ class ProxyViewController: NSViewController, ProfileCustomization {
labelProxyCaption.stringValue = L10n.Core.Global.Captions.address.asCaption
textProxyAddress.placeholderString = L10n.Core.Global.Values.none
textProxyPort.placeholderString = L10n.Core.Global.Values.none
labelPACCaption.stringValue = "PAC".asCaption
textPAC.placeholderString = L10n.Core.Global.Values.none
tableProxyBypass.title = L10n.App.NetworkSettings.Proxy.Cells.BypassDomains.title.asCaption
viewProxyBypass.addSubview(tableProxyBypass)
@ -108,6 +114,7 @@ class ProxyViewController: NSViewController, ProfileCustomization {
view.endEditing()
networkSettings.proxyAddress = textProxyAddress.stringValue
networkSettings.proxyPort = UInt16(textProxyPort.stringValue)
networkSettings.proxyAutoConfigurationURL = URL(string: textPAC.stringValue)
networkSettings.proxyBypassDomains = tableProxyBypass.rows
delegate?.profileCustomization(self, didUpdateProxy: .manual, withManualSettings: networkSettings)
@ -136,6 +143,7 @@ class ProxyViewController: NSViewController, ProfileCustomization {
textProxyAddress.stringValue = networkSettings.proxyAddress ?? ""
textProxyPort.isEnabled = (currentChoice == .manual)
textProxyPort.stringValue = networkSettings.proxyPort?.description ?? ""
textPAC.stringValue = networkSettings.proxyAutoConfigurationURL?.absoluteString ?? ""
tableProxyBypass.reset(withRows: networkSettings.proxyBypassDomains ?? [], isAddEnabled: currentChoice == .manual)
let isServer = (currentChoice == .server)