diff --git a/Dockerfile b/Dockerfile index 2e97839..75ad416 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.14 AS base +FROM alpine:latest AS base RUN apk add --no-cache tzdata && \ cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ @@ -6,10 +6,10 @@ RUN apk add --no-cache tzdata && \ apk del tzdata && \ adduser -D subconverter -FROM alpine:3.14 AS downloader +FROM alpine:latest AS download ARG TARGETPLATFORM -ENV VERSION v0.7.1 +ENV VERSION v0.7.2 WORKDIR / @@ -36,8 +36,8 @@ USER subconverter WORKDIR /home/subconverter -COPY --from=downloader /usr/bin/subconverter /usr/bin/ -COPY --from=downloader --chown=subconverter:subconverter /subconverter . +COPY --from=download /usr/bin/subconverter /usr/bin/ +COPY --from=download --chown=subconverter:subconverter /subconverter . COPY --chown=subconverter:subconverter config . EXPOSE 25500 diff --git a/config/snippets/emoji.toml b/config/snippets/emoji.toml index 6c4c565..c781330 100644 --- a/config/snippets/emoji.toml +++ b/config/snippets/emoji.toml @@ -1,81 +1,161 @@ [[emoji]] -match = "(?i:流量|时间|应急|过期|Bandwidth|expire)" +match = "(?i:Bandwidth|expire|流量|时间|应急|过期)" emoji = "🏳️‍🌈" [[emoji]] -match = "AC" +match = "(?i:\\bHK[G]?\\b|Hong.*?Kong|\\bHKT\\b|\\bHKBN\\b|\\bHGC\\b|\\bWTT\\b|\\bCMI\\b|[^-]港)" +emoji = "🇭🇰" + +[[emoji]] +match = "(?i:\\bTW[N]?\\b|Taiwan|新北|彰化|\\bCHT\\b|台湾|[^-]台|\\bHINET\\b)" +emoji = "🇹🇼" + +[[emoji]] +match = "(?i:\\bSG[P]?\\b|Singapore|新加坡|狮城|李家坡|[^-]新)" +emoji = "🇸🇬" + +[[emoji]] +match = "(?i:\\bJP[N]?\\b|Japan|Tokyo|Osaka|Saitama|日本|东京|大阪|埼玉|東京|[^-]日)" +emoji = "🇯🇵" + +[[emoji]] +match = "(?i:\\bK[O]?R\\b|Korea|首尔|韩|韓|首爾)" +emoji = "🇰🇷" + +[[emoji]] +match = "(?i:\\bUS[A]?\\b|America|United.*?States|美国|[^-]美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|美國)" +emoji = "🇺🇸" + +[[emoji]] +match = "(Ascension|阿森松)" emoji = "🇦🇨" [[emoji]] -match = "(AR|阿根廷)" -emoji = "🇦🇷" +match = "(?i:\\bUAE\\b|Dubai|阿联酋|迪拜)" +emoji = "🇦🇪" [[emoji]] -match = "波兰" -emoji = "🇵🇱" +match = "(阿尔巴尼亚|Albania)" +emoji = "🇦🇱" + +[[emoji]] +match = "(Argentina|阿根廷)" +emoji = "🇦🇷" [[emoji]] -match = "(奥地利|维也纳)" +match = "(Austria|Vienna|奥地利|维也纳)" emoji = "🇦🇹" [[emoji]] -match = "(AU|Australia|Sydney|澳大利亚|悉尼)" +match = "(?i:\\bAU[S]?\\b|Australia|Sydney|澳大利亚|澳洲|悉尼)" emoji = "🇦🇺" [[emoji]] -match = "BE" +match = "(阿塞拜疆|Azerbaijan)" +emoji = "🇦🇿" + +[[emoji]] +match = "(波黑共和国|波士尼亚与赫塞哥维纳|Bosnia|Herzegovina)" +emoji = "🇧🇦" + +[[emoji]] +match = "(Belgium|比利时)" emoji = "🇧🇪" [[emoji]] -match = "(BR|Brazil|巴西|圣保罗)" +match = "(保加利亚|Bulgaria)" +emoji = "🇧🇬" + +[[emoji]] +match = "(Brazil|Paulo|巴西|圣保罗)" emoji = "🇧🇷" [[emoji]] -match = "(Canada|加拿大|蒙特利尔|温哥华|多倫多|楓葉|枫叶)" +match = "(?i:\\bCA[N]?\\b|Canada|Toronto|Montreal|Vancouver|加拿大|蒙特利尔|温哥华|楓葉|枫叶|多倫多)" emoji = "🇨🇦" [[emoji]] -match = "(瑞士|苏黎世)" +match = "(Switzerland|Zurich|瑞士|苏黎世)" emoji = "🇨🇭" [[emoji]] -match = "(DE|Germany|法兰克福|德)" +match = "(智利|Chile)" +emoji = "🇨🇱" + +[[emoji]] +match = "(Colombia|哥伦比亚)" +emoji = "🇨🇴" + +[[emoji]] +match = "(Costa Rica|哥斯达黎加)" +emoji = "🇨🇷" + +[[emoji]] +match = "(塞浦路斯|Cyprus)" +emoji = "🇨🇾" + +[[emoji]] +match = "(Czech|捷克)" +emoji = "🇨🇿" + +[[emoji]] +match = "(?i:\\bDE[U]?\\b|Germany|法兰克福|德(国|意志)|中德|^德$)" emoji = "🇩🇪" [[emoji]] -match = "丹麦" +match = "(?i:\\bD[N]?K\\b|Denmark|丹麦)" emoji = "🇩🇰" [[emoji]] -match = "ES" +match = "(爱沙尼亚|Estonia)" +emoji = "🇪🇪" + +[[emoji]] +match = "(埃及|Egypt)" +emoji = "🇪🇬" + +[[emoji]] +match = "(?i:\\bES[P]?\\b|Spain|西班牙)" emoji = "🇪🇸" [[emoji]] -match = "EU" +match = "(Europe|欧洲)" emoji = "🇪🇺" [[emoji]] -match = "(Finland|芬兰|赫尔辛基)" +match = "(Finland|Helsinki|芬兰|赫尔辛基)" emoji = "🇫🇮" [[emoji]] -match = "(FR|France|法国|巴黎)" +match = "(?i:\\bFR[A]?\\b|France|Paris|法国|巴黎)" emoji = "🇫🇷" [[emoji]] -match = "(?i:UK|England|United.*?Kingdom|英国|[^-]英|伦敦)" +match = "(?i:\\bUK\\b|\\bGB[R]?\\b|England|United.*?Kingdom|London|英国|[^-]英|伦敦)" emoji = "🇬🇧" [[emoji]] -match = "(?i:HK|Hong.*?Kong|HKT|HKBN|HGC|WTT|CMI|[^-]港)" -emoji = "🇭🇰" +match = "(希腊|Greece)" +emoji = "🇬🇷" + +[[emoji]] +match = "(格鲁吉亚|Georgia)" +emoji = "🇬🇪" + +[[emoji]] +match = "(克罗地亚|Croatia)" +emoji = "🇭🇷" + +[[emoji]] +match = "(Hungary|匈牙利)" +emoji = "🇭🇺" [[emoji]] -match = "(Indonesia|印尼|印度尼西亚|雅加达)" +match = "(Indonesia|Jakarta|印尼|印度尼西亚|雅加达)" emoji = "🇮🇩" [[emoji]] -match = "(Ireland|爱尔兰|都柏林)" +match = "(Ireland|Dublin|爱尔兰|都柏林)" emoji = "🇮🇪" [[emoji]] @@ -83,101 +163,178 @@ match = "(Israel|以色列)" emoji = "🇮🇱" [[emoji]] -match = "(曼岛|马恩岛)" +match = "(马恩岛|Mann)" emoji = "🇮🇲" [[emoji]] -match = "(India|印度|孟买)" +match = "(?i:\\bIN[D]?\\b|India|Mumbai|印度|孟买|孟買|加尔各答|贾坎德|泰米尔纳德)" emoji = "🇮🇳" [[emoji]] -match = "(Iceland|冰岛)" +match = "(伊朗|Iran)" +emoji = "🇮🇷" + +[[emoji]] +match = "(?i:\\bIS[L]?\\b|Iceland|冰岛)" emoji = "🇮🇸" [[emoji]] -match = "(Italy|意大利|米兰)" +match = "(Italy|Milan|意大利|米兰)" emoji = "🇮🇹" [[emoji]] -match = "(JP|Japan|日本|東京|[^-]日)" -emoji = "🇯🇵" +match = "(约旦|Jordan)" +emoji = "🇯🇴" + +[[emoji]] +match = "(肯尼亚|Kenya)" +emoji = "🇰🇪" + +[[emoji]] +match = "(吉尔吉斯斯坦|Kyrgyzstan)" +emoji = "🇰🇬" [[emoji]] -match = "(KP|朝鲜)" +match = "(柬埔寨|Cambodia)" +emoji = "🇰🇭" + + +[[emoji]] +match = "(North.*?Korea|朝鲜)" emoji = "🇰🇵" [[emoji]] -match = "(KR|Korea|KOR|首尔|首爾|韩|韓)" -emoji = "🇰🇷" +match = "(哈萨克斯坦|Kazakhstan)" +emoji = "🇰🇿" + +[[emoji]] +match = "(立陶宛|Lietuvos)" +emoji = "🇱🇹" [[emoji]] -match = "(MO|Macao|澳门|CTM)" +match = "(卢森堡|Luxemburg|Luxembourg)" +emoji = "🇱🇺" + +[[emoji]] +match = "(拉脱维亚|Latvia)" +emoji = "🇱🇻" + +[[emoji]] +match = "(Moldova|摩尔多瓦)" +emoji = "🇲🇩" + +[[emoji]] +match = "(北马其顿|Macedonia)" +emoji = "🇲🇰" + +[[emoji]] +match = "(蒙古|Монголулс|Mongolia)" +emoji = "🇲🇳" + +[[emoji]] +match = "(Macao|澳门|\\bCTM\\b)" emoji = "🇲🇴" [[emoji]] -match = "(MY|Malaysia|马来西亚)" +match = "(墨西哥|Mexico)" +emoji = "🇲🇽" + +[[emoji]] +match = "(Malaysia|马来西亚|MY)" emoji = "🇲🇾" [[emoji]] -match = "(NL|Netherlands|荷兰|阿姆斯特丹)" +match = "(尼日利亚|Nigeria)" +emoji = "🇳🇬" + +[[emoji]] +match = "(?i:\\bNL[D]?\\b|Netherlands|荷兰|阿姆斯特丹)" emoji = "🇳🇱" [[emoji]] -match = "(Norway|挪威)" +match = "(挪威|Norway)" emoji = "🇳🇴" [[emoji]] -match = "(新西兰|纽西兰)" +match = "(新西兰|纽西兰|New Zealand)" emoji = "🇳🇿" [[emoji]] -match = "(PH|Philippines|菲律宾)" +match = "(Philippines|菲律宾)" emoji = "🇵🇭" [[emoji]] -match = "(RO|罗马尼亚)" +match = "(Pakistan|巴基斯坦)" +emoji = "🇵🇰" + +[[emoji]] +match = "(?i:\\bP[O]?L\\b|Poland|波兰)" +emoji = "🇵🇱" + +[[emoji]] +match = "(巴拿马|Panama)" +emoji = "🇵🇦" + +[[emoji]] +match = "(秘鲁|Peru)" +emoji = "🇵🇪" + +[[emoji]] +match = "(葡萄牙|Portugal)" +emoji = "🇵🇹" + +[[emoji]] +match = "(Romania|罗马尼亚)" emoji = "🇷🇴" [[emoji]] -match = "(RU|Russia|伯力|莫斯科|圣彼得堡|西伯利亚|新西伯利亚|新西伯利亞|俄罗斯|[^-]俄)" +match = "(塞尔维亚|Serbia)" +emoji = "🇷🇸" + +[[emoji]] +match = "(?i:\\bRU[S]?\\b|Russia|Moscow|Petersburg|Siberia|伯力|莫斯科|圣彼得堡|西伯利亚|新西伯利亚|哈巴罗夫斯克|俄罗斯|西伯利亞|新西伯利亞|[^-]俄)" emoji = "🇷🇺" [[emoji]] -match = "(沙特|迪拜)" +match = "(Arabia|沙特)" emoji = "🇸🇦" [[emoji]] -match = "(SE|Sweden|瑞典|斯德哥爾摩)" +match = "(Sweden|瑞典|斯德哥爾摩)" emoji = "🇸🇪" [[emoji]] -match = "(SG|Singapore|新加坡|李家坡|狮城|[^-]新)" -emoji = "🇸🇬" +match = "(斯洛文尼亚|Slovenia)" +emoji = "🇸🇮" + +[[emoji]] +match = "(斯洛伐克|Slovensko)" +emoji = "🇸🇰" [[emoji]] -match = "(TH|Thailand|泰国|曼谷)" +match = "(Thailand|泰国|曼谷)" emoji = "🇹🇭" [[emoji]] -match = "(TR|Turkey|土耳其|伊斯坦布尔)" +match = "(突尼斯|Tunisia)" +emoji = "🇹🇳" + +[[emoji]] +match = "(Turkey|土耳其|伊斯坦布尔)" emoji = "🇹🇷" [[emoji]] -match = "(?i:US|America|United.*?States|美国|美國|[^-]美|美西|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥)" -emoji = "🇺🇸" +match = "(乌拉圭|Uruguay)" +emoji = "🇺🇾" [[emoji]] -match = "(VN|越南)" +match = "(Vietnam|越南)" emoji = "🇻🇳" [[emoji]] -match = "(ZA|南非)" +match = "(Africa|南非)" emoji = "🇿🇦" [[emoji]] -match = "(?i:TW|Taiwan|新北|彰化|CHT|台湾|[^-]台|HINET)" -emoji = "🇹🇼" - -[[emoji]] -match = "(?i:CN|China|回国|中国|江苏|北京|上海|广州|深圳|杭州|徐州|青岛|宁波|镇江|back)" +match = "(?i:\\bC[H]?N\\b|China|回国|中国[^-]|江苏[^-]|北京[^-]|上海[^-]|广州[^-]|深圳[^-]|杭州[^-]|常州[^-]|徐州[^-]|青岛[^-]|宁波[^-]|镇江[^-]|成都[^-]|back)" emoji = "🇨🇳"