XX-net / XX-Net

A proxy tool to bypass GFW.
33.04k stars 7.69k forks source link

Install Miredo on macOS #8425

Open qingsheng0214 opened 6 years ago

qingsheng0214 commented 6 years ago

经过很长一段时间摸索,终于成功在macOS上(macOS Sierra Version 10.12.6)安装了Miredo,现在已试用一周,基本稳定,因此现在希望把这个经验分享给各位macOS的使用者,也希望各位能够帮助测试是否还有其它的问题(比如最新的macOS 10.13以上版本),最终使得macOS上miredo的使用更加完美。下面简单介绍一下具体步骤:

  1. Download & Install Tunnelblick (for signed tun purpose)

     https://tunnelblick.net/downloads.html
  2. Check whether has installed MacPorts & Execute the command below in Terminal

     port
  3. If not installed yet, Download & Install MacPorts

     https://www.macports.org/install.php
  4. Execute command & Install Miredo

      port search miredo
      sudo port install miredo
  5. Execute commands as below in Terminal & Check whether has loaded tun-signed kext

     kextstat | grep tun
  6. If exists, skip this step. If empty, Execute command & Try to load tun-signed.kext from Tunnelblick.app

    sudo kextload /Applications/Tunnelblick.app/Contents/Resources/tun-signed.kext
  7. Start up Miredo

    sudo miredo

  8. Check tun-signed.kext and Miredo again

     kextstat | grep tun
     ps aux | grep miredo

完成以上步骤,就可以使用Miredo了,关键点就在于Tunnelblick和MacPorts,如果还是不成功的话,各位还是要多摸索一下了。祝各位都能成功并使用顺利。

另: 当然,各位可以简单写一个脚本,在开机的时候使用root权限执行一下来启动Miredo,大概的脚本如下所示:

!/bin/bash

SIGNED_TUN_PATH=/Applications/Tunnelblick.app/Contents/Resources/

cd $SIGNED_TUN_PATH sudo kextload tun-signed.kext sudo miredo

zhilidali commented 5 years ago

@jasonzwf 万分感谢,已成功

HelloJacky commented 5 years ago

sudo port install miredo 报错

Error: Unable to open port: couldn't change working directory to "/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/miredo": no such file or directory

系统:10.14

求解答!谢谢

dnzng commented 5 years ago

@zhilidali 在终端下执行命令: sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Headers /System/Library/Frameworks/Kernel.framework/Headers 然后重新安装

ln: /System/Library/Frameworks/Kernel.framework/Headers: Operation not permitted 执行后出现这个,请问怎么解决?

xiaodongxing commented 5 years ago

miredo一直是红灯是为什么

j2cms commented 5 years ago

@zhilidali 在终端下执行命令: sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Headers /System/Library/Frameworks/Kernel.framework/Headers 然后重新安装

ln: /System/Library/Frameworks/Kernel.framework/Headers: Operation not permitted 执行后出现这个,请问怎么解决?

我也遇到这个问题,请问你解决了吗?

j2cms commented 5 years ago

@zhilidali 在终端下执行命令: sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Headers /System/Library/Frameworks/Kernel.framework/Headers 然后重新安装

ln: /System/Library/Frameworks/Kernel.framework/Headers: Operation not permitted 执行后出现这个,请问怎么解决?

我也遇到这个问题,请问你解决了吗?

我解决了 ,还是要先 csrutil disable

El Capitan now protects certain system directories in "rootless" mode (a.k.a. System Integrity Protection). If you run the command ls -lO /System/Library/LaunchDaemons you'll see that the directories and files under there are now marked as "restricted."

You can disable rootless mode like this:

Reboot into recovery mode (reboot and hold down Cmd-R) Open a terminal Use this command: csrutil disable Reboot and run the command that worked prior to El Capitan When you're done, it is highly recommended that you re-enable SIP by following the same steps, but using csrutil enable in step 3.

j2cms commented 5 years ago

有效,而且不需要关闭苹果的sip

还是要先 csrutil disable

a3512740 commented 5 years ago

有效,而且不需要关闭苹果的sip

export PATH=/opt/local/bin:/opt/local/sbin:$PATH 设置下环境变量就可以了

wjain commented 5 years ago

终于搞定了,虽然系统偏好里面没有Miredo,但是ipv6可以用了

gerogelin commented 5 years ago

osx 10.14.1 xx-net 3.13.1 有没有人遇到这样的问题啊: 按照wiki里面的教程进行了安装,pkg都成功安装 kextstat | grep tun ps aux | grep miredo 这两个也都有输出 系统偏好里面没有miredo ipv6也ping不通

感激不尽

easonlv commented 5 years ago

Miredo一直是红灯,肿么办

AnyWAT commented 5 years ago

更换服务器(IP)。。。😂来自另类系统:#12043

718MGQ commented 5 years ago

osx 10.14.1 xx-net 3.13.1 有没有人遇到这样的问题啊: 按照wiki里面的教程进行了安装,pkg都成功安装 kextstat | grep tun ps aux | grep miredo 这两个也都有输出 系统偏好里面没有miredo ipv6也ping不通

感激不尽

+1

MarkWong87 commented 5 years ago

按wiki安装成功并启动,也可以访问google了,但是过不了多久就不行了,重启下命令有事好使,有时不行,这是怎么回事

AnyWAT commented 5 years ago

参考:#12455 ?

stupidsongshu commented 5 years ago

sudo kextload /Applications/Tunnelblick.app/Contents/Resources/tun-signed.kext 执行上面的命令后报错提示: /Applications/Tunnelblick.app/Contents/Resources/tun-signed.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).

查看了Tunnelblick(Tunnelblick_3.8.1beta01_build_5380.dmg)安装包,Contents/Resources 目录下没有 tun-signed.kext, 扩展名为kext的只有 tun-notarized.kexttap-notarized.kext 两个。

Tunnelblick安装前用gpg的验证结果是:

gpg: 签名建立于 六  7/20 01:40:52 2019 CST
gpg:               使用 RSA 密钥 B4D96F0D6A58E335A0F4923A2FF3A2B2DC6FD12C
gpg: 完好的签名,来自于 “Tunnelblick Security <tunnelblicksecurity@protonmail.com>” [未知]
gpg: 警告:此密钥未被受信任签名认证!
gpg:       没有证据表明此签名属于其声称的所有者。
主密钥指纹: 76DF 975A 1C56 4277 4FB0  9868 FF5F D80E 6BB9 367E
     子密钥指纹: B4D9 6F0D 6A58 E335 A0F4  923A 2FF3 A2B2 DC6F D12C

试了很久,不知道是哪里的问题了。

greeniecoder commented 5 years ago

miredo装好了,ps aux 也看到进程正常启动了。 但是在系统偏好里面没有,没有办法看什么黄灯绿灯的。 这么明显的问题,没有人提过?10.14.2的版本。

tw93 commented 4 years ago

miredo装好了,ps aux 也看到进程正常启动了。 但是在系统偏好里面没有,没有办法看什么黄灯绿灯的。 这么明显的问题,没有人提过?10.14.2的版本。

+1

hzx505 commented 4 years ago

运行 sudo miredo sudo: unable to execute /usr/sbin/miredo: Bad CPU type in executable ---------查到 如下资料 我了解到目前您的 Mac 更新至 macOS Catalina 后安装应用程序提示“bad CPU type in executable“。目前,Apple 现已完成向 64 位技术的过渡。从 macOS Catalina 开始,32 位 App 不再与 macOS 兼容

是不是 在 10.15.3 系统 miredo 是32位应用 无法使用?

littlen9ne commented 4 years ago

tunnleblick可以使用homebrew装,实在不行可以去官网下载安装包。 Miredo非常建议使用1.0.6那个旧版本,就是第一个链接的zip。 安装后系统直接提示你“系统设置需要刷新才能看到”就可用图标开关miredo了。 另外目录/Applications/Tunnelblick.app/Contents/Resources/ 默认没有tun-signed.kext的,要去tuntap的文件里面找到tun-signed.text和tap-signed.text复制到上面目录下就OK了。

heisajoker commented 4 years ago

终于搞定了,虽然系统偏好里面没有Miredo,但是ipv6可以用了

你这个怎么搞定的呢?

Lynnluxu commented 4 years ago

到第七步输入sudo miredo后似乎会出现: Cannot create PID file /opt/local/var/run/miredo.pid: Resource temporarily unavailable Please make sure another instance of the program is not already running.

你用的是虚拟机吗?我使用虚拟机的时候,在虚拟机内运行miredo出现了类似的问题。

jingxinxin commented 3 years ago

macOS Catalina 10.15.7 亲测可用 在sudo port install miredo的时候,遇到安装依赖失败的问题 比如:Fetching archive for tuntaposx 可以通过先过滤安装miredo,单独安装tuntaposx包 命令如下: sudo port install miredo -tuntaposx

或则sudo port edit miredo 然后,您从depends_lib或depends_lib-append中删除依赖项保存编辑文件,再重新安装即可

drcege commented 2 years ago

如果安装 miredo 失败,建议检查一下编译器是不是 gcc/g++,mac 默认的 clang 不行

drcege commented 2 years ago

tunnleblick可以使用homebrew装,实在不行可以去官网下载安装包。 Miredo非常建议使用1.0.6那个旧版本,就是第一个链接的zip。 安装后系统直接提示你“系统设置需要刷新才能看到”就可用图标开关miredo了。 另外目录/Applications/Tunnelblick.app/Contents/Resources/ 默认没有tun-signed.kext的,要去tuntap的文件里面找到tun-signed.text和tap-signed.text复制到上面目录下就OK了。

请问你说的 “1.0.6那个旧版本,就是第一个链接的zip” 是哪个链接?

还有 tuntap 是哪里?从哪里找到 kext 文件

heisajoker commented 2 years ago

有事留下姓名!