diff --git a/clash_for_windows/DEBIAN/control b/clash_for_windows/DEBIAN/control new file mode 100644 index 0000000..58a8d34 --- /dev/null +++ b/clash_for_windows/DEBIAN/control @@ -0,0 +1,5 @@ +Package: clash-for-windows +Version: 0.20.38 +Architecture: amd64 +Maintainer: Clash for Windows Linux +Description: A Windows/macOS/Linux GUI based on Clash diff --git a/clash_for_windows/DEBIAN/postinst b/clash_for_windows/DEBIAN/postinst new file mode 100644 index 0000000..e7f374b --- /dev/null +++ b/clash_for_windows/DEBIAN/postinst @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright 2009 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +# Add icons to the system icons +XDG_ICON_RESOURCE="`command -v xdg-icon-resource 2> /dev/null || true`" +if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 +fi +for icon in icon_48.png icon_24.png icon_128.png icon_64.png icon_256.png icon_32.png icon_16.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" install --size "${size}" "/opt/clash_for_windows/${icon}" \ + "clash-for-windows" +done + +UPDATE_MENUS="`command -v update-menus 2> /dev/null || true`" +if [ -x "$UPDATE_MENUS" ]; then + update-menus +fi + +# Update cache of .desktop file MIME types. Non-fatal since it's just a cache. +update-desktop-database > /dev/null 2>&1 || true + + diff --git a/clash_for_windows/DEBIAN/postrm b/clash_for_windows/DEBIAN/postrm new file mode 100644 index 0000000..53f7166 --- /dev/null +++ b/clash_for_windows/DEBIAN/postrm @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2009 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +action="$1" + +# Only do complete clean-up on purge. +if [ "$action" != "purge" ] ; then + exit 0 +fi + diff --git a/clash_for_windows/DEBIAN/prerm b/clash_for_windows/DEBIAN/prerm new file mode 100644 index 0000000..e69398a --- /dev/null +++ b/clash_for_windows/DEBIAN/prerm @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Copyright 2009 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +action="$1" +if [ "$2" = "in-favour" ]; then + # Treat conflict remove as an upgrade. + action="upgrade" +fi +# Don't clean-up just for an upgrade.` +if [ "$action" = "upgrade" ] ; then + exit 0 +fi + +# Remove icons from the system icons +XDG_ICON_RESOURCE="`command -v xdg-icon-resource 2> /dev/null || true`" +if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 +fi +for icon in icon_48.png icon_24.png icon_128.png icon_64.png icon_256.png icon_32.png icon_16.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" uninstall --size "${size}" "clash-for-windows" +done + + +# remove services and files +systemctl stop clash-core-service.service > /dev/null 2>&1 || true +systemctl disable clash-core-service.service > /dev/null 2>&1 || true +rm -f /usr/lib/systemd/system/clash-core-service.service > /dev/null 2>&1 || true +systemctl reset-failed > /dev/null 2>&1 || true + +HOME_CONFIG="`getent passwd ${SUDO_UID:-$(id -u)} | cut -d: -f 6`/.config" +rm -rf "$HOME_CONFIG/clash" > /dev/null 2>&1 || true +rm -rf "$HOME_CONFIG/clash_win" > /dev/null 2>&1 || true + +UPDATE_MENUS="`command -v update-menus 2> /dev/null || true`" +if [ -x "$UPDATE_MENUS" ]; then + update-menus +fi + +# Update cache of .desktop file MIME types. Non-fatal since it's just a cache. +update-desktop-database > /dev/null 2>&1 || true diff --git a/clash_for_windows/opt/clash_for_windows/icon_128.png b/clash_for_windows/opt/clash_for_windows/icon_128.png new file mode 100644 index 0000000..1775ed4 Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_128.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_16.png b/clash_for_windows/opt/clash_for_windows/icon_16.png new file mode 100644 index 0000000..8dfc803 Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_16.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_24.png b/clash_for_windows/opt/clash_for_windows/icon_24.png new file mode 100644 index 0000000..79984ab Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_24.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_256.png b/clash_for_windows/opt/clash_for_windows/icon_256.png new file mode 100644 index 0000000..f41cfac Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_256.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_32.png b/clash_for_windows/opt/clash_for_windows/icon_32.png new file mode 100644 index 0000000..d0b5207 Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_32.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_32.xpm b/clash_for_windows/opt/clash_for_windows/icon_32.xpm new file mode 100644 index 0000000..81d0c93 --- /dev/null +++ b/clash_for_windows/opt/clash_for_windows/icon_32.xpm @@ -0,0 +1,397 @@ +/* XPM */ +static char *dummy[]={ +"32 32 362 2", +"Qt c None", +"dN c #030303", +"du c #020202", +".B c #080808", +".p c #1a1a1a", +"dC c #0e0e0e", +"ds c #090909", +".# c #2b2b2b", +".y c #1a1a1a", +"dx c #101010", +"dB c #111111", +".x c #303030", +".u c #494949", +"dr c #2c2c2c", +"dy c #2c2c2c", +"dM c #353535", +".D c #3a3a3a", +"dv c #424242", +".q c #787878", +".o c #777777", +"dD c #444444", +".v c #686868", +".a c #868686", +"dq c #666666", +".C c #7a7a7a", +"dp c #818181", +"dL c #797979", +".J c #898989", +"dE c #898989", +".n c #bdbdbd", +"dK c #a6a6a6", +"c6 c #b7b7b7", +".P c #bcbcbc", +".b c #cacaca", +"dF c #aaaaaa", +"cQ c #bababa", +".X c #c4c4c4", +"dA c #b7b7b7", +"dJ c #bababa", +"cA c #bdbdbd", +"#. c #bdbdbd", +"#p c #bfbfbf", +"cn c #c0c0c0", +"dI c #bfbfbf", +"dH c #bfbfbf", +"dG c #c0c0c0", +"c7 c #cacaca", +"dt c #cecece", +".E c #d9d9d9", +".t c #e6e6e6", +"dz c #cfcfcf", +".A c #e4e4e4", +"dw c #e6e6e6", +".m c #ebebeb", +".c c #f2f2f2", +".r c #f7f7f7", +"bZ c #000015", +"cU c #000018", +"c3 c #00001c", +"cV c #00001f", +"cZ c #000029", +"c0 c #00002a", +"cY c #00002b", +".V c #00004a", +"c4 c #000119", +"c1 c #000129", +"cX c #00012a", +"c2 c #00012c", +"ai c #000243", +"cW c #00082f", +"ay c #000947", +".S c #000a58", +"c# c #000b3b", +"bW c #000c3d", +"cl c #000e3b", +"bH c #001141", +"cx c #00123a", +"a8 c #001449", +"aR c #00144a", +"cN c #001640", +"bm c #00174a", +"aB c #001a50", +"bA c #001b4b", +"#8 c #001b58", +"aE c #002159", +"#4 c #00215e", +"aa c #00225d", +".8 c #002368", +"#G c #002461", +"#s c #002463", +"#Q c #002562", +"#T c #002964", +"#w c #002968", +"#b c #002969", +"bv c #011a4a", +"bN c #011e4b", +"aM c #012158", +"#m c #013270", +"ae c #02215d", +"b3 c #03204c", +"aq c #03255d", +"bK c #040810", +"cr c #04143d", +"#v c #04316e", +"bd c #05295a", +"aO c #052e61", +"am c #06255d", +".0 c #063272", +"cG c #071c43", +"au c #07255d", +"#z c #083370", +"#A c #083670", +"cC c #090920", +"cD c #090e26", +"bj c #092958", +"aF c #092c61", +"#x c #093470", +"cf c #0a264e", +"a4 c #0a2f5f", +"#y c #0a3671", +"aL c #0b3062", +"#V c #0b3169", +"as c #0c3468", +"#d c #0c3974", +"ce c #0d294f", +"#C c #0d3872", +"#2 c #0e3269", +"al c #0f2f62", +"#W c #0f356d", +"a0 c #103664", +".7 c #103673", +"cH c #112c52", +"aU c #113665", +"#1 c #11386e", +"#I c #113a72", +"#O c #113b73", +".Z c #11407b", +"cO c #121c46", +"bc c #123463", +".1 c #123472", +"a2 c #123565", +"aW c #123665", +"#3 c #123c72", +"bi c #133563", +"be c #143664", +"aN c #143a6b", +"#l c #144179", +"cL c #152e52", +"cu c #152e53", +"cs c #152e54", +"cI c #152f52", +"#D c #153b74", +"cJ c #162e52", +"cv c #162e53", +"ct c #162e54", +"cK c #162f53", +"cM c #162f54", +"bu c #163864", +"aD c #163b6c", +"ci c #173057", +"ch c #173058", +"cw c #173156", +"cj c #173158", +"b9 c #173259", +"b8 c #17325a", +"b5 c #17325b", +"b7 c #17335a", +"b6 c #17335b", +"ar c #173e6f", +"bU c #18345d", +"bS c #18345e", +"bP c #18345f", +"bT c #18355e", +"bQ c #18355f", +"bG c #183863", +"aV c #183a68", +"aC c #183d6c", +"aG c #183f6e", +"cg c #193259", +"ck c #19345a", +"c. c #19355c", +"bR c #19355e", +"bE c #193661", +"bF c #193760", +"bD c #193761", +"bC c #193762", +"bt c #193863", +"#U c #194377", +"bV c #1a365f", +"bp c #1a3864", +"br c #1a3865", +"bo c #1a3964", +"bq c #1a3965", +"b. c #1a3b67", +"bf c #1a3b68", +"a1 c #1a3e6a", +"aS c #1a3e6c", +"#P c #1a4479", +"b4 c #1b355d", +"bh c #1b3c67", +"ba c #1b3c68", +"bg c #1b3c69", +"bO c #1c3a63", +"bs c #1c3a65", +"b# c #1c3d68", +"a5 c #1c3f6b", +"aK c #1c4270", +"#J c #1c447a", +"bb c #1d3d69", +"bB c #1d3e66", +"at c #1d4374", +".R c #1d4c85", +"bn c #1e3e68", +"a9 c #1e3f6b", +"aT c #1e3f6d", +"#h c #1e427a", +"#Z c #1e4578", +"#X c #1e4779", +"#N c #1e477b", +"ab c #1f4377", +"#Y c #1f4579", +"#g c #20437a", +"b2 c #21385e", +"a3 c #21426f", +"ac c #214577", +"#L c #214a7d", +"ad c #224779", +"#0 c #224b7c", +"cc c #232c4c", +"#i c #23447b", +"#t c #234b81", +"#H c #244c7f", +"#M c #244d7f", +"#c c #245186", +"aJ c #264572", +"#K c #264f80", +"#7 c #274373", +"#u c #275083", +"cy c #283054", +"#B c #285285", +"an c #294a78", +"#9 c #2b4c7c", +"aH c #2d4b78", +".N c #2f3674", +"#n c #2f5083", +"#k c #325486", +"#e c #335688", +"bM c #36456a", +"cm c #374465", +"aP c #374f78", +"#S c #385482", +"aZ c #39547d", +"cT c #3a3c44", +"cb c #3e4865", +".K c #3f4d86", +"aX c #405a82", +"#f c #405f8d", +"#j c #415f8d", +"ax c #48638b", +"aI c #496289", +"bz c #4c567a", +"ah c #4d6690", +"ca c #525f7d", +"az c #55688d", +".L c #566797", +"#F c #57739a", +".9 c #5a79a1", +"df c #60677e", +"de c #60687f", +"dg c #61687f", +"dh c #626a80", +"dd c #636b82", +"bl c #657290", +"di c #667085", +"aY c #687b99", +"co c #697185", +"dc c #697186", +"dj c #6d778c", +"db c #6f798c", +"bX c #708099", +"cF c #727c93", +"av c #7284a3", +"dk c #737d91", +".U c #748aaf", +"da c #788195", +"aj c #788da9", +"af c #7a8dab", +"#r c #7d95b3", +"dl c #808599", +"bJ c #828799", +"d# c #848899", +"a7 c #8495ab", +"ap c #8798b2", +"dm c #888a98", +".W c #88a0bd", +"cE c #8b8ea1", +"bI c #8b96ab", +"a# c #91a2bb", +"d. c #9796a5", +"#a c #9aaac3", +".T c #9dabc5", +"#5 c #a0aec4", +"dn c #a2a2a8", +".O c #a2a7c3", +"aQ c #a2aec1", +"bL c #a3a3ab", +"bY c #a3a7b4", +"bw c #a6acbe", +"b0 c #b0b7c5", +"bx c #b6b7bb", +"by c #b9bac2", +"c9 c #bbbac3", +"aA c #c1c7d5", +".Y c #c1cada", +"bk c #c2c8d4", +"#R c #c2cbd9", +"cd c #d2d7de", +"cq c #d3d2da", +"c5 c #d3d7dc", +"cS c #d5d5db", +"c8 c #d6d9df", +"cp c #d7dbe9", +"ak c #d9dfe6", +"cB c #dadbdf", +".F c #dcdbe6", +"ao c #e0e3ea", +".6 c #e0e3eb", +"aw c #e0e4ea", +"cP c #e2e7eb", +".H c #e5eaf0", +"#E c #e6eaf0", +".4 c #e9eef3", +".I c #ebebf1", +"a6 c #ebeef3", +".3 c #ecf0f5", +".5 c #eff2f6", +"a. c #eff3f6", +"## c #f0f0f0", +".Q c #f0f3f7", +".h c #f1f1f1", +".2 c #f1f4f7", +"#q c #f2f2f2", +"ag c #f2f5f8", +".i c #f3f3f3", +"#6 c #f3f5f8", +".M c #f3fafc", +".g c #f4f4f4", +"b1 c #f4f5f7", +".j c #f5f5f5", +"cR c #f6f6f6", +"do c #f6f6f7", +".z c #f7f7f7", +"cz c #f7f9fb", +".G c #f8f8fa", +".l c #f9f9f9", +".e c #fafafa", +".f c #fbfbfb", +".d c #fcfcfc", +".k c #fdfdfd", +"#o c #fdfefe", +".w c #fefefe", +".s c #ffffff", +"QtQtQt.#.a.b.c.d.d.e.e.f.d.g.h.i.i.h.j.d.e.e.e.k.l.m.n.o.pQtQtQt", +"QtQt.q.r.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.t.uQtQt", +"Qt.v.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.w.xQt", +".y.z.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.A.B", +".C.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.D", +".E.s.s.s.s.s.s.s.s.s.F.G.s.s.s.s.s.s.s.s.s.H.I.s.s.s.s.s.s.s.s.J", +".j.s.s.s.s.s.s.s.s.s.K.L.s.s.s.s.s.s.s.s.M.N.O.s.s.s.s.s.s.s.s.P", +".f.s.s.s.s.s.s.s.s.Q.R.S.T.s.s.s.s.s.s.s.U.V.W.s.s.s.s.s.s.s.s.X", +".g.s.s.s.s.s.s.s.s.Y.Z.0.1.2.s.3.4.5.s.6.7.8.9.s.s.s.s.s.s.s.s#.", +"##.s.s.s.s.s.s.s.s#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o.s.s.s.s.s.s.s#p", +"#q.s.s.s.s.s.s.s.s#r#s#t#u#v#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o.s.s.s.s.sdp", +"dq.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.sdr", +"ds.f.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.sdtdu", +"Qtdv.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.sdwdxQt", +"QtQtdydz.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.s.sdAdBQtQt", +"QtQtQtdCdDdEdF#.dGdHdHdHdHdHdHdHdHdHdHdHdHdHdIdIdJdKdLdMdNQtQtQt"}; diff --git a/clash_for_windows/opt/clash_for_windows/icon_48.png b/clash_for_windows/opt/clash_for_windows/icon_48.png new file mode 100644 index 0000000..65ffa03 Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_48.png differ diff --git a/clash_for_windows/opt/clash_for_windows/icon_64.png b/clash_for_windows/opt/clash_for_windows/icon_64.png new file mode 100644 index 0000000..5c8eb4f Binary files /dev/null and b/clash_for_windows/opt/clash_for_windows/icon_64.png differ diff --git a/clash_for_windows/usr/share/applications/clash-for-windows.desktop b/clash_for_windows/usr/share/applications/clash-for-windows.desktop new file mode 100644 index 0000000..09d97b1 --- /dev/null +++ b/clash_for_windows/usr/share/applications/clash-for-windows.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Version=1.0 +Name=Clash for Windows +# Only KDE 4 seems to use GenericName, so we reuse the KDE strings. +# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. +GenericName=VPN +GenericName[zh_CN]=网络代理 +# Gnome and KDE 3 uses Comment. +Comment=VPN +Comment[zh_CN]=网络代理 +Exec=/opt/clash_for_windows/cfw %U +Terminal=false +Icon=clash-for-windows +Type=Application +Categories=Network;VPN;