Giter Club home page Giter Club logo

set-dns-script's Introduction

Clash
Continuation of Clash Verge

A Clash Meta GUI based on Tauri.

Preview

Dark Light
预览 预览

Install

请到发布页面下载对应的安装包:Release page
Go to the release page to download the corresponding installation package
Supports Windows (x64/x86), Linux (x64/arm64) and macOS 10.15+ (intel/apple).

安装说明和常见问题,请到文档页查看:Doc


Promotion

狗狗加速 —— 技术流机场 Doggygo VPN

  • 高性能海外机场,免费试用,优惠套餐,解锁流媒体,全球首家支持 Hysteria 协议。
  • 使用 Clash Verge 专属邀请链接注册送 3 天,每天 1G 流量免费试用:https://verge.狗狗加速.com/#/register?code=oaxsAGo6
  • Clash Verge 专属 8 折优惠码: verge20 (仅有 500 份)
  • 优惠套餐每月仅需 15.8 元,160G 流量,年付 8 折
  • 海外团队,无跑路风险,高达 50% 返佣
  • 集群负载均衡设计,高速专线(兼容老客户端),极低延迟,无视晚高峰,4K 秒开
  • 全球首家 Hysteria 协议机场,现已上线更快的 Hysteria2 协议(Clash Verge 客户端最佳搭配)
  • 解锁流媒体及 ChatGPT
  • 官网:https://狗狗加速.com

Features

  • Since the clash core has been removed. The project no longer maintains the clash core, but only the Clash Meta core.
  • Profiles management and enhancement (by yaml and Javascript). Doc
  • Improved UI and supports custom theme color.
  • Built-in support Clash.Meta(mihomo) core.
  • System proxy setting and guard.

FAQ

Refer to Doc FAQ Page

Development

See CONTRIBUTING.md for more details.

To run the development server, execute the following commands after all prerequisites for Tauri are installed:

pnpm i
pnpm run check
pnpm dev

Contributions

Issue and PR welcome!

Acknowledgement

Clash Verge rev was based on or inspired by these projects and so on:

License

GPL-3.0 License. See License here for details.

set-dns-script's People

Contributors

mystipanda avatar nahidabuer avatar

Watchers

 avatar

set-dns-script's Issues

脚本执行目录不应当是 `/`,没有写权限

set_dns.sh 无法写入 original_dns.txt,它的执行目录是 /,也就是会往 /original_dns.txt 写内容。理论上执行 set_dns.sh 应该会报错,但查看日志发现依然是成功运行的。

可以手动修改 set_dns.sh 进行简单验证:

set -e
echo `pwd` > ~/Downloads/pwd.txt
exit 1

重启 clash-verge-rev,查看日志发现还是成功。然而这个脚本的退出码不是 0,但 clash-verge-rev 里没有检查退出码,只是检查了一下 output()Result。我看了一下 Tauri 的文档源码,这个 Result 只会报 spawn() 产生的错误,还需要额外检查退出码是否为 0

也就是说 clash-verge-rev这一段代码需要修改,验证 set_dns.sh 的执行结果。另外就是 original_dns.txt 的写入目录也需要修改,不然没有写权限。

关联的 Issue

Related to clash-verge-rev/clash-verge-rev#841.

版本信息

系统版本:macOS Sonoma 14.4.1 23E224 arm64
Verge 版本:v1.6.0
Clash 内核:v1.18.1 Meta

sh 脚本获取 Hardware Port 名称时,如果名称是用空格分开的话(就像图中的),就获取不到完整的名称,这样获取 DNS 和设置 DNS 都会失败 经测试把名称中间的空格去掉就行了

sh 脚本获取 Hardware Port 名称时,如果名称是用空格分开的话(就像图中的),就获取不到完整的名称,这样获取 DNS 和设置 DNS 都会失败
经测试把名称中间的空格去掉就行了
IMG_20240505_103406
问了一下 ai,改成这样就可以了
hardware_port=$(networksetup -listallhardwareports | awk -v dev="$nic" -F': ' '/Hardware Port/{port=$2} /Device:/{if ($2 == dev) {gsub(/ /,"",port); print port; exit}}')

macos 开启 tun 模式.不能正确生成 original_dns.txt

升级到最新的 1.6.1 版本了,不知道是不是由于权限的原因,macos 开启 tun 模式时,不能正确生成 original_dns.txt,导致原始 DNS 不能被记录下来,当关闭 tun 模式时,不能将 DNS 还原到开启前

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.