[Q&A] some confusing points about TUN mode in the new version ab2f0ec
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- linux, shell
- Domain
- cli, networking
Research direction
Start by reproducing the reported behavior on commit ab2f0ec with clashoff, clashon, clashsub update, and clashstatus. Inspect the shell logic behind these commands and the interactive-shell http_proxy check; done means TUN state remains consistent after restarts and updates, and startup notifications match the selected mode.
Written by the indexing model from the issue text.
Description
前置确认
使用的分支
master
Commit ID
ab2f0ec
Shell 环境
zsh
问题描述
[Q&A] some confusing points about TUN mode in the new version ab2f0ec
I recently upgraded to ab2f0ec from a version from about one year ago. There are a couple of unexpected things. I want to ask:
1. Assumptions
From what I understand mihomo has two modes, system-proxy and TUN. And it is recommended to only enable one mode and disable the other.
I have TUN mode on and system-proxy mode off.
2. TUN mode consistency questions
Suppose system-proxy is off and TUN is on. If I restart clash by first running clashoff and then running clashon, TUN mode will be off.
A similar case occurs for TUN mode, after running clashsub update. TUN mode is on before running the command but off after running it.
In the last version I used, TUN mode behaves consistently (always on when set so). In the latest version (ab2f0ec), it is not. Is this intended or a bug?
In daily use, I have to turn off and on TUN mode manually in order to have "Internet access". When clashstatus returns three processes (like in step 3 in the above screenshot), it works. And when clashstatus returns only one process (like in step 7 in the above screenshot), it doesn't work. Why?
3. Repetitive start-of-interactive-shell notifications potentially related to TUN mode
The script checks if http_proxy is empty. If it is, clashon is called.
It seems this logic only accounts for clashproxy mode, where http_proxy is non-empty; in clashtun mode, http_proxy is still empty, in which case I get the 已开启代理环境 notifications in every interactive shell session.
Is this intended or a bug?
- Dominant language
- Shell
- Stars
- 15.2k
- Forks
- 1.7k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nelvko/clashctl
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
zeabur-oss/builder#304 ·
Maintainers usually reply within 1 day
-
documentation security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
maiychrus25/OpenTea-DX-OS#221 ·
-
ci severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TMHSDigital/Spackle#205 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
obra/superpowers#2766 ·
Maintainers usually reply within 1 day