MCPcopy Index your code
hub / github.com/csujedihy/proximac

github.com/csujedihy/proximac @2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.1 ↗ · + Follow
87 symbols 144 edges 14 files 6 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Proximac

Overview

Proximac is an open-source alternative to Proxifier. With Proximac, users can force App to use SOCKS5 proxy. I hope more developers can join this project.

Features:

  1. Support multi processes.
  2. Support SOCKS5 authentication using username/password.
  3. White list (TODO).

Note: Proximac only works on Mac OSX.

How to build

NOTE: Proximac is based on libuv. So, before compile this project, make sure libuv was successfully installed:

$ git clone https://github.com/libuv/libuv.git
$ cd libuv
$ sh autogen.sh
$ ./configure
$ make install

Then, open Xcode project file and build it.

Usage

  1. Build both kext and user-space program (proximac).
  2. Modify the config file to set your proxy info and the names of processes to be hooked (See more details below).
  3. Run the following commands.

Or,

  1. Download Zip archive of binary files from release page.
  2. Extarct files.
  3. Run the following commands.
  sudo chown -R root:wheel proximac.kext
  sudo kextload proximac.kext
  sudo ./proximac-cli -c config.conf

Detailed usage of proximac:

  proximac
    -c <config_file> Path of configuration file that is written in JSON
    -d daemon mode

Example of configuration file

We use almost the same config file as shadowsocks do but add new arguments.

{
    "process_name":
    ["Unibox", "Google Chrome", "Thunder"], 
    "local_port":1080,
    "local_address":"127.0.0.1",
    "proximac_listen_address":"127.0.0.1",
    "proximac_port":8558,
    "username":"foo",
    "password":"bar"
}

Note:

process_name are names of processes that you want to force to use SOCKS5 proxy, which can be found in Contents/MacOS folder inside those Apps (right click on Apps to get inside). local_address and local_port is the ip address and the listen port of your SOCKS5 proxy, respectively. Leave proximac_listen_address and proximac_port alone because these are hardcoded in kext source unless you know what you are doing. usernameandpasswordare for SOCKS5 proxy required authentication.

References

This software is partly based on projects below.

  1. Shadowsocks-libev.
  2. Shadowsocks-libuv.
  3. libuv.
  4. js0n.
  5. tcplognke (Apple).
  6. drcom4mac (As my kext dev guide book)

Contact:

csujedi at icloud dot com

Core symbols most depended-on inside this repo

release_lock
called by 2
proximac/proximac.c
release_locks
called by 2
proximac/proximac.c
alloc_rwlock
called by 2
proximac/proximac.c
pid_hash
called by 2
proximac/proximac.c
uninstall_proximac_tcp_filter
called by 2
proximac/proximac.c
hash
called by 2
proximac-cli/utils.c
tell_kernel_to_unhook
called by 2
proximac-cli/local.c
init_locks
called by 1
proximac/proximac.c

Shape

Function 55
Class 32

Languages

C72%
C++28%

Modules by API surface

proximac/proximac.c32 symbols
proximac-cli/local.c23 symbols
proximac/tree.h8 symbols
proximac-cli/tree.h8 symbols
proximac-cli/utils.c5 symbols
proximac-cli/local.h5 symbols
proximac-cli/socks5.h2 symbols
proximac-cli/jconf.c2 symbols
proximac-cli/utils.h1 symbols
proximac-cli/js0n.c1 symbols

For agents

$ claude mcp add proximac \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact