Remove OTA

This commit is contained in:
qinyuhang
2017-02-05 20:10:04 +08:00
parent 6971a18124
commit 27add56b38
2 changed files with 2 additions and 19 deletions
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D17a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16E144f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
@@ -18,7 +18,6 @@
<outlet property="groupTextField" destination="P1H-Vl-P4W" id="xgB-St-g6r"/>
<outlet property="hostTextField" destination="R4F-j7-GkK" id="a1I-WO-Qdj"/>
<outlet property="methodTextField" destination="ef4-8J-eFn" id="OXd-fC-ICR"/>
<outlet property="otaCheckBoxBtn" destination="9CP-zt-WuH" id="egZ-KB-iSv"/>
<outlet property="passwordTextField" destination="ZXA-oi-Zv3" id="qK5-Uq-hyb"/>
<outlet property="portTextField" destination="lng-AE-g0J" id="7b1-ox-WSL"/>
<outlet property="profileBox" destination="oZ5-85-pwY" id="D19-PQ-X7E"/>
@@ -202,13 +201,6 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button translatesAutoresizingMaskIntoConstraints="NO" id="9CP-zt-WuH">
<rect key="frame" x="109" y="59" width="192" height="18"/>
<buttonCell key="cell" type="check" title="Enable OTA" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="hRZ-Rp-I5e">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="o4d-yF-Vi8">
<rect key="frame" x="7" y="294" width="308" height="17"/>
<constraints>
@@ -303,7 +295,6 @@
</subviews>
<constraints>
<constraint firstItem="ef4-8J-eFn" firstAttribute="trailing" secondItem="ZXA-oi-Zv3" secondAttribute="trailing" id="0zF-f1-SSA"/>
<constraint firstItem="6mK-sY-xoH" firstAttribute="top" secondItem="9CP-zt-WuH" secondAttribute="bottom" constant="20" id="57J-fU-kGS"/>
<constraint firstItem="ioe-Gj-Ufy" firstAttribute="leading" secondItem="CbS-wf-XMN" secondAttribute="leading" id="5ss-uH-XtS"/>
<constraint firstItem="ioe-Gj-Ufy" firstAttribute="top" secondItem="5ze-PG-cOA" secondAttribute="bottom" constant="18" id="7Q9-g4-mNf"/>
<constraint firstItem="KdT-hY-ALS" firstAttribute="leading" secondItem="CbS-wf-XMN" secondAttribute="leading" id="7wS-bA-EZx"/>
@@ -315,7 +306,6 @@
<constraint firstItem="CbS-wf-XMN" firstAttribute="leading" secondItem="q3C-S0-iNn" secondAttribute="leading" id="FNr-O1-HJY"/>
<constraint firstItem="Otb-CO-KUH" firstAttribute="top" secondItem="lng-AE-g0J" secondAttribute="top" id="Fxg-Cr-oUS"/>
<constraint firstItem="R4F-j7-GkK" firstAttribute="leading" secondItem="HPg-NP-kjP" secondAttribute="trailing" constant="8" symbolic="YES" id="ICB-Zf-vBn"/>
<constraint firstItem="9CP-zt-WuH" firstAttribute="trailing" secondItem="6mK-sY-xoH" secondAttribute="trailing" id="Izl-pA-eOR"/>
<constraint firstItem="ioe-Gj-Ufy" firstAttribute="trailing" secondItem="CbS-wf-XMN" secondAttribute="trailing" id="J3Y-el-kPn"/>
<constraint firstItem="ZXA-oi-Zv3" firstAttribute="top" secondItem="ef4-8J-eFn" secondAttribute="bottom" constant="21" id="Jm2-qw-LDq"/>
<constraint firstItem="Qfe-Ql-iCO" firstAttribute="leading" secondItem="a3z-VL-3xV" secondAttribute="leading" constant="41" id="Jml-r9-IwL"/>
@@ -327,8 +317,8 @@
<constraint firstItem="lng-AE-g0J" firstAttribute="leading" secondItem="Otb-CO-KUH" secondAttribute="trailing" constant="7" id="MoN-nP-zoX"/>
<constraint firstItem="KdT-hY-ALS" firstAttribute="trailing" secondItem="CbS-wf-XMN" secondAttribute="trailing" id="Nkz-we-OMC"/>
<constraint firstItem="6ha-OP-X4G" firstAttribute="trailing" secondItem="dl9-Pk-Krw" secondAttribute="trailing" constant="-4" id="OTx-aD-YQ3"/>
<constraint firstItem="P1H-Vl-P4W" firstAttribute="trailing" secondItem="KdT-hY-ALS" secondAttribute="trailing" id="Ote-ap-MOK"/>
<constraint firstItem="dl9-Pk-Krw" firstAttribute="top" secondItem="o4d-yF-Vi8" secondAttribute="bottom" constant="18" id="PwO-jq-20h"/>
<constraint firstItem="P1H-Vl-P4W" firstAttribute="trailing" secondItem="9CP-zt-WuH" secondAttribute="trailing" id="QGr-BM-E7I"/>
<constraint firstItem="ZXA-oi-Zv3" firstAttribute="trailing" secondItem="q3C-S0-iNn" secondAttribute="trailing" id="QwO-x4-05P"/>
<constraint firstItem="5ze-PG-cOA" firstAttribute="trailing" secondItem="CbS-wf-XMN" secondAttribute="trailing" id="Riv-KQ-heB"/>
<constraint firstItem="8zX-44-xj8" firstAttribute="bottom" secondItem="P1H-Vl-P4W" secondAttribute="bottom" constant="-2" id="SiB-oY-d4m"/>
@@ -357,7 +347,6 @@
<constraint firstAttribute="trailing" secondItem="lng-AE-g0J" secondAttribute="trailing" constant="24" id="wWs-Wb-elv"/>
<constraint firstItem="R4F-j7-GkK" firstAttribute="baseline" secondItem="lng-AE-g0J" secondAttribute="baseline" id="wXb-ip-mHm"/>
<constraint firstItem="lng-AE-g0J" firstAttribute="trailing" secondItem="ef4-8J-eFn" secondAttribute="trailing" id="xCr-IR-gPv"/>
<constraint firstItem="9CP-zt-WuH" firstAttribute="leading" secondItem="q3C-S0-iNn" secondAttribute="leading" id="xdn-FN-7E8"/>
<constraint firstItem="KdT-hY-ALS" firstAttribute="baseline" secondItem="EgC-0w-FPq" secondAttribute="baseline" id="y9D-jH-UUw"/>
<constraint firstItem="R4F-j7-GkK" firstAttribute="top" secondItem="a3z-VL-3xV" secondAttribute="top" constant="20" symbolic="YES" id="ydG-iv-Ecv"/>
<constraint firstItem="q3C-S0-iNn" firstAttribute="trailing" secondItem="6mK-sY-xoH" secondAttribute="trailing" id="yiB-Nj-00X"/>
-6
View File
@@ -18,7 +18,6 @@ class ServerProfile: NSObject {
var method:String = "aes-128-cfb"
var password:String = ""
var remark:String = ""
var ota: Bool = false // onetime authentication
var ssrProtocol:String = "origin"
var ssrProtocolParam:String = ""
@@ -47,9 +46,6 @@ class ServerProfile: NSObject {
if let remark = data["Remark"] {
profile.remark = remark as! String
}
if let ota = data["OTA"] {
profile.ota = ota as! Bool
}
if let ssrObfs = data["ssrObfs"] {
profile.ssrObfs = ssrObfs as! String
}
@@ -86,7 +82,6 @@ class ServerProfile: NSObject {
d["Method"] = method as AnyObject?
d["Password"] = password as AnyObject?
d["Remark"] = remark as AnyObject?
d["OTA"] = ota as AnyObject?
d["ssrProtocol"] = ssrProtocol as AnyObject?
d["ssrProtocolParam"] = ssrProtocolParam as AnyObject?
d["ssrObfs"] = ssrObfs as AnyObject?
@@ -106,7 +101,6 @@ class ServerProfile: NSObject {
conf["local_port"] = NSNumber(value: UInt16(defaults.integer(forKey: "LocalSocks5.ListenPort")) as UInt16)
conf["local_address"] = defaults.string(forKey: "LocalSocks5.ListenAddress") as AnyObject?
conf["timeout"] = NSNumber(value: UInt32(defaults.integer(forKey: "LocalSocks5.Timeout")) as UInt32)
conf["auth"] = NSNumber(value: ota as Bool)
if(!ssrObfs.isEmpty){
conf["protocol"] = ssrProtocol as AnyObject?