Skip to content

[Q&A] some confusing points about TUN mode in the new version ab2f0ec #480

Description

@ghcred

前置确认

  • 我已查阅 常见问题,但仍未找到解决方案
  • 我已使用关键字查询相关 Issues,但仍未找到解决方案

使用的分支

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

Image

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

Image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions