update clash core & localize

This commit is contained in:
yicheng 2020-06-05 20:04:40 +08:00
parent 5dde87ba6d
commit 09bb020710
7 changed files with 26 additions and 25 deletions

View File

@ -6,7 +6,7 @@ jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: import certs
run: |
openssl aes-256-cbc -k "${{ secrets.ENCRYPTION_SECRET }}" -in ".github/certs/dist.p12.enc" -d -a -out ".github/certs/dist.p12"
@ -14,7 +14,7 @@ jobs:
bundle install
- name: setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: 1.14.x

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -278,7 +278,7 @@
<menu key="submenu" title="Config" id="tck-zU-JKQ">
<items>
<menuItem isSeparatorItem="YES" id="WzG-og-OyZ"/>
<menuItem title="Open config Folder" keyEquivalent="o" id="DwE-WX-ETZ">
<menuItem title="Open local config Folder" keyEquivalent="o" id="DwE-WX-ETZ">
<connections>
<action selector="openConfigFolder:" target="Voe-Tx-rLC" id="6Ke-Bi-AAZ"/>
</connections>
@ -644,7 +644,6 @@
<tableColumns>
<tableColumn identifier="url" editable="NO" width="176" minWidth="40" maxWidth="1000" id="C79-J5-30z">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Url">
<font key="font" metaFont="label" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
@ -684,7 +683,6 @@
</tableColumn>
<tableColumn identifier="configName" width="86" minWidth="40" maxWidth="1000" id="lRE-Xa-euB">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Config Name">
<font key="font" metaFont="label" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
@ -724,7 +722,6 @@
</tableColumn>
<tableColumn identifier="updateTime" width="95" minWidth="40" maxWidth="1000" id="xoc-hs-9qa">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Update Time">
<font key="font" metaFont="label" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>

View File

@ -8,9 +8,9 @@
import Foundation
enum ClashProxyMode: String, Codable {
case rule = "Rule"
case global = "Global"
case direct = "Direct"
case rule
case global
case direct
}
extension ClashProxyMode {
@ -45,8 +45,12 @@ class ClashConfig: Codable {
static func fromData(_ data: Data) -> ClashConfig? {
let decoder = JSONDecoder()
let model = try? decoder.decode(ClashConfig.self, from: data)
return model
do {
return try decoder.decode(ClashConfig.self, from: data)
} catch let err {
Logger.log((err as NSError).description, level: .error)
return nil
}
}
func copy() -> ClashConfig? {

View File

@ -1,7 +1,7 @@
module github.com/yichengchen/clashX/ClashX
require (
github.com/Dreamacro/clash v0.20.1-0.20200601054326-fb0289bb4c35
github.com/Dreamacro/clash v0.20.1-0.20200605094350-98614a1f3fd2
github.com/oschwald/geoip2-golang v1.4.0
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
)

View File

@ -1,5 +1,5 @@
github.com/Dreamacro/clash v0.20.1-0.20200601054326-fb0289bb4c35 h1:abt75++XNmK+NnLHCARnZ8feerNf9FF0mvNfPENMInQ=
github.com/Dreamacro/clash v0.20.1-0.20200601054326-fb0289bb4c35/go.mod h1:KiPMTu1n6emQzUyY/A7W4mZYzQLfhToryDUp8ypta7E=
github.com/Dreamacro/clash v0.20.1-0.20200605094350-98614a1f3fd2 h1:yWSV9Bnbbt0EQzcwrvk45j93sCCbAw8CTLJjA996p5w=
github.com/Dreamacro/clash v0.20.1-0.20200605094350-98614a1f3fd2/go.mod h1:KiPMTu1n6emQzUyY/A7W4mZYzQLfhToryDUp8ypta7E=
github.com/Dreamacro/go-shadowsocks2 v0.1.5 h1:BizWSjmwzAyQoslz6YhJYMiAGT99j9cnm9zlxVr+kyI=
github.com/Dreamacro/go-shadowsocks2 v0.1.5/go.mod h1:LSXCjyHesPY3pLjhwff1mQX72ItcBT/N2xNC685cYeU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@ -50,8 +50,8 @@
/* Class = "NSMenuItem"; title = "SILENT"; ObjectID = "dVr-Xp-C0C"; */
"dVr-Xp-C0C.title" = "SILENT";
/* Class = "NSMenuItem"; title = "Open config Folder"; ObjectID = "DwE-WX-ETZ"; */
"DwE-WX-ETZ.title" = "打开配置文件夹";
/* Class = "NSMenuItem"; title = "Open local config Folder"; ObjectID = "DwE-WX-ETZ"; */
"DwE-WX-ETZ.title" = "打开本地配置文件夹";
/* Class = "NSMenuItem"; title = "Manage"; ObjectID = "Dwg-Qb-2AU"; */
"Dwg-Qb-2AU.title" = "管理";

View File

@ -1,8 +1,8 @@
PODS:
- Alamofire (5.1.0)
- AppCenter/Analytics (3.1.1):
- Alamofire (5.2.1)
- AppCenter/Analytics (3.2.0):
- AppCenter/Core
- AppCenter/Core (3.1.1)
- AppCenter/Core (3.2.0)
- CocoaLumberjack/Core (3.6.1)
- CocoaLumberjack/Swift (3.6.1):
- CocoaLumberjack/Core
@ -37,7 +37,7 @@ DEPENDENCIES:
- WebViewJavascriptBridge
SPEC REPOS:
trunk:
https://cdn.cocoapods.org/:
- Alamofire
- AppCenter
- CocoaLumberjack
@ -54,8 +54,8 @@ SPEC REPOS:
- WebViewJavascriptBridge
SPEC CHECKSUMS:
Alamofire: 9d5c5f602928e512395b30950c5984eca840093c
AppCenter: 513d32888854d67d8cfbd3a8db16aeb5fb2e2a75
Alamofire: e911732990610fe89af59ac0077f923d72dc3dfd
AppCenter: ca66175050d538b157959382dd43f1ab96cdab84
CocoaLumberjack: b17ae15142558d08bbacf69775fa10c4abbebcc9
Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df
Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74
@ -71,4 +71,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: d3f4f5683423e593e4fca7cc5adb1846dfe66b1a
COCOAPODS: 1.9.1
COCOAPODS: 1.9.2