Optimize: Not upgrade ini if a yml exsits

This commit is contained in:
yicheng 2018-10-19 21:21:56 +08:00
parent ec25648ebd
commit 4dfca99ffd
5 changed files with 20 additions and 16 deletions

View File

@ -300,7 +300,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="delayCell" id="qZT-29-xCE">
<rect key="frame" x="278" y="1" width="168" height="17"/>
<rect key="frame" x="277.5" y="1" width="168" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="QCv-NJ-qh9">
@ -331,11 +331,11 @@
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="iP6-D2-2yO">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="iP6-D2-2yO">
<rect key="frame" x="1" y="283" width="448" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="cen-QY-aDc">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="cen-QY-aDc">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>

View File

@ -149,10 +149,10 @@ extension ConfigFileFactory {
static func upgardeIniIfNeed() {
let iniPath = kConfigFolderPath + "config.ini"
guard FileManager.default.fileExists(atPath: iniPath) else {return}
guard !FileManager.default.fileExists(atPath: kConfigFilePath) else {return}
upgradeIni()
let targetPath = kConfigFolderPath + "config\(Date().timeIntervalSince1970).bak"
try? FileManager.default.moveItem(atPath: iniPath, toPath: targetPath)
}
private static func upgradeIni() {

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.5</string>
<string>1.6.0</string>
<key>CFBundleVersion</key>
<string>1.5.5</string>
<string>1.6.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
@ -40,6 +40,6 @@
<key>SUEnableAutomaticChecks</key>
<true/>
<key>SUFeedURL</key>
<string>https://github.com/yichengchen/clashX/raw/master/appcast.xml</string>
<string>https://yichengchen.github.io/clashX/appcast.xml</string>
</dict>
</plist>

View File

@ -36,27 +36,27 @@ Proxy:
# 支持加密方式: AEAD_AES_128_GCM AEAD_AES_192_GCM AEAD_AES_256_GCM AEAD_CHACHA20_POLY1305 AES-128-CTR AES-192-CTR AES-256-CTR AES-128-CFB AES-192-CFB AES-256-CFB CHACHA20-IETF XCHACHA20
# clash 在 v0.7.1 后支持 chacha20 和 rc4-md5 加密方式
- { name: "ss1", type: ss, server: server, port: 443, cipher: AEAD_CHACHA20_POLY1305, password: "password" }
- { name: "ss2", type: ss, server: server, port: 443, cipher: AEAD_CHACHA20_POLY1305, password: "password", obfs: tls, obfs-host: bing.com }
# - { name: "ss1", type: ss, server: server, port: 443, cipher: AEAD_CHACHA20_POLY1305, password: "password" }
# - { name: "ss2", type: ss, server: server, port: 443, cipher: AEAD_CHACHA20_POLY1305, password: "password", obfs: tls, obfs-host: bing.com }
# vmess
# 支持加密方式auto / aes-128-gcm / chacha20-poly1305 / none
- { name: "vmess1", type: vmess, server: server, port: 443, uuid: uuid, alterId: 32, cipher: auto }
- { name: "vmess2", type: vmess, server: server, port: 443, uuid: uuid, alterId: 32, cipher: auto, tls: true }
# - { name: "vmess1", type: vmess, server: server, port: 443, uuid: uuid, alterId: 32, cipher: auto }
# - { name: "vmess2", type: vmess, server: server, port: 443, uuid: uuid, alterId: 32, cipher: auto, tls: true }
# socks5
- { name: "socks", type: socks5, server: server, port: 443 }
# - { name: "socks", type: socks5, server: server, port: 443 }
Proxy Group:
# url-test 可以自动选择与指定 URL 测速后,延迟最短的服务器
- { name: "auto", type: url-test, proxies: ["ss1", "ss2", "vmess1"], url: https://www.bing.com, interval: 300 }
# - { name: "auto", type: url-test, proxies: ["ss1", "ss2", "vmess1"], url: https://www.bing.com, interval: 300 }
# fallback 可以尽量按照用户书写的服务器顺序,在确保服务器可用的情况下,自动选择服务器
- { name: "fallback-auto", type: fallback, proxies: ["ss1", "ss2", "vmess1"], url: https://www.bing.com, interval: 300 }
# - { name: "fallback-auto", type: fallback, proxies: ["ss1", "ss2", "vmess1"], url: https://www.bing.com, interval: 300 }
# select 用来允许用户手动选择 代理服务器 或 服务器组
# 您也可以使用 RESTful API 去切换服务器,这种方式推荐在 GUI 中使用
- { name: "Proxy", type: select, proxies: ["ss1", "ss2", "vmess1", "auto"] }
# - { name: "Proxy", type: select, proxies: ["ss1", "ss2", "vmess1", "auto"] }
Rule:
# Apple 服务优化

View File

@ -6,9 +6,13 @@
<description>Most recent changes with links to updates.</description>
<language>cn</language>
<item>
<title>1.5.5</title>
<title>1.6.0</title>
<description>
<![CDATA[
<ul>
<li>1.6.0</li>
<li><br>Break Change: Use Yaml config file.</br></li>
</ul>
<ul>
<li>1.5.5</li>
<li>bug fixs</li>