Categories
Network OS X 笔记

MacOS VPN Auto Add Routes

By @sskaje
Link: https://sskaje.me/2019/04/macos-vpn-auto-add-routes/


I tested on macOS 10.14, L2TP VPN.

I connect to my office VPN to work remotely, but I don’t want to send all traffic to VPN interface. Usually, I open a Terminal.app and execute commands after VPN connected:

192.168.2.0/24 is address block used in my office, 192.168.100.1 is VPN gateway address.

It’s really inconvenient. But I have a new solution: networksetup.

Usage: networksetup -setadditionalroutes <networkservice> [ <dest> <mask> <gateway> ]*
        Set additional IPv4 routes associated with <networkservice>
        by specifying one or more [ <dest> <mask> <gateway> ] tuples.
        Remove additional routes by specifying no arguments.
        If <gateway> is “”, the route is direct to the interface

First, find your service name.

Find your VPN connection name, in my case ‘My Office’.

If you have multiple route entries to add,

L2TP is a Point-to-Point VPN, the gateway address is not that important, that’s why I use “” instead of 192.168.100.1.



MacOS VPN Auto Add Routes by @sskaje: https://sskaje.me/2019/04/macos-vpn-auto-add-routes/
Categories
OS X

VMware Fusion: Cannot connect to a valid peer process

By @sskaje
Link: https://sskaje.me/2018/05/vmware-fusion-connect-valid-peer-process/

I ran VMware Fusion 10 on macOS, and got this error when starting a VM.
Cannot connect to a valid peer process
找不到可以连接的有效对等进程

I googled, most guys says to trust developer from Preferences.app, but I’ve already trusted.

I checked process list, only:

I tried this on another working mac:

Those processes are started by /Applications/VMware\ Fusion.app/Contents/Library/services/services.sh.

In this file, find

Uncomment those two lines, and re-run, check “/tmp/debug”:

Verbose output

Compare signatures

I Googled again and found https://communities.vmware.com/thread/584909 saying unload some kernel extensions might work.

I remember VMware Fusion turned not working days after I installed VirtualBox and rebooted, so I remove VirtualBox.app and unload all useless extensions:

No error now.

VMware Fusion: Cannot connect to a valid peer process by @sskaje: https://sskaje.me/2018/05/vmware-fusion-connect-valid-peer-process/

Incoming search terms:

Categories
OS X 项目、研究

unzip with lzfse support

By @sskaje
Link: https://sskaje.me/2017/08/unzip-with-lzfse-support/

LZFSE is a compression library introduced by Apple.

LZFSE is a Lempel-Ziv style data compression algorithm using Finite State Entropy coding. It targets similar compression rates at higher compression and decompression speed compared to deflate using zlib.

Github: https://github.com/lzfse/lzfse

Apple uses LZFSE compressing its ipa packages.
I downloaded an ipa directly from appstore, named like pre-thinned xxx .thinned.signed.dpkg.ipa, e.g. pre-thinned12345678.thinned.signed.dpkg.ipa

I tried to decompress this ipa, with unzip, 7-Zip on windows, many many other archiver management tools, all failed.

unsupported compression method 99

I integrated lzfse into unzip based on unzip-6.0.
Github: https://github.com/sskaje/unzip-lzfse

Steps:
1 Build and install lzfse

2 Build unzip-lzfse

3 test

Tested under macOS 10.12.6

unzip with lzfse support by @sskaje: https://sskaje.me/2017/08/unzip-with-lzfse-support/

Incoming search terms:

Categories
Linux OS X

Virtualize macOS Sierra on Ubuntu (Vmware)

By @sskaje
Link: https://sskaje.me/2016/12/virtualize-macos-sierra-ubuntu-vmware/

I need to run something on macOS, but I don’t have any dedicated Mac devices running as server/workstation.

This is a simple tutorial running macOS VM on Ubuntu with VMware workstation server.

Environment

VMware Fusion 8.5.3
macOS Sierra
Ubuntu Server 16.04
VMware workstation server 12.5.2

Virtualize macOS Sierra on Ubuntu (Vmware) by @sskaje: https://sskaje.me/2016/12/virtualize-macos-sierra-ubuntu-vmware/

Incoming search terms:

Categories
OS X 笔记

How to Download Apple Boot Camp Drivers for Windows

By @sskaje
Link: https://sskaje.me/2016/12/download-apple-boot-camp-drivers-windows/

1 Download this file: http://swcatalog.apple.com/content/catalogs/others/index-windows-1.sucatalog

2 Search for AppleBcUpdate.exe, check if PostDate field below.

3 Download

How to Download Apple Boot Camp Drivers for Windows by @sskaje: https://sskaje.me/2016/12/download-apple-boot-camp-drivers-windows/