Total Pageviews

Monday, 6 June 2022

macOS/Linux上的全局代理程序:TS-Warp


Transparent SOCKS proxy Wrapper.

CodeQL

Goals and TODO list

  •  Create a soxifier service - transparent redirector of TCP/IP connections to a SOCKS-proxy server.

  • Support platforms:

    •  macOS, FreeBSD and OpenBSD with PF
    •  Linux with Iptables
  •  IPv6 stack support

  •  Maintain simple configuraion structure as INI-file

  •  Support basic SOCKS authentication methods

  •  Password encoding (obfuscation) in configuration files

  •  SOCKS proxy chains

  •  Daemon mode

  •  Front-end UI

  •  Installation script

  •  Documentation

Changelog

See it here

Installation

  • Download ts-warp sources and unarchive them, or just clone the repository:

    $ git clone https://github.com/mezantrop/ts-warp
  • In the directory with ts-warp source code run:

    # make install

    This will install all the files under the /usr/local tree. If a different installation path is required, set a PREFIX:

    # make install PREFIX=/path/to/install
  • Create <PREFIX>/etc/ts-warp.ini based on <PREFIX>/etc/ts-warp.ini.sample file to suite your needs

  • Optional. Edit <PREFIX>/etc/ts-warp.sh to customize PID-, LOG- and INI- files location

  • On macOS and *BSD. Create <PREFIX>/etc/ts-warp_pf.conf based on appropriate <PREFIX>/etc/ts-warp_pf_*.conf.sample to configure the packet filter

  • On Linux. Create <PREFIX>/etc/ts-warp_iptables.sh based on <PREFIX>/etc/ts-warp_iptables.sh.sample to configure firewall

Usage

Under root privileges start, control or get status of ts-warp:

# <PREFIX>/etc/ts-warp.sh start|restart [options]
# <PREFIX>/etc/ts-warp.sh stop|reload|status

All the ts-warp command-line options can be listed using $ ts-warp -h:

Usage:
  ts-warp -i IP:Port -c file.ini -l file.log -v 0-4 -d -p file.pid -f -u user -h

Version:
  TS-Warp-1.0.6

All parameters are optional:
  -i IP:Port        Incoming local IP address and port
  -c file.ini       Configuration file, default: /usr/local/etc/ts-warp.ini

  -l file.log       Log filename, default: /usr/local/var/log/ts-warp.log
  -v 0..4           Log verbosity level: 0 - off, default 3

  -d                Daemon mode
  -p file.pid       PID filename, default: /usr/local/var/run/ts-warp.pid
  -f                Force start

  -u user           User to run ts-warp from, default: nobody

  -h                This message

For example, to temporary enable more verbose logs, restart ts-warp with -v 4 option:

# <PREFIX>/etc/ts-warp.sh restart -v 4

ts-warp understands SIGHUP signal as the command to reload configuration and SIGINT to stop the daemon.

Use ts-pass to encode passwords if requred. See examples in ts-warp.ini

GUI front-end

gui-warp.py

Experimental GUI front-end application to control ts-warp daemon can be installed from the gui directory:

# cd gui
# make install

Optionally. Set PREFIX, to use a different installation target in the make command above:

# make install PREFIX=/path/to/install

To start the GUI run:

# <PREFIX>/bin/gui-warp.py &

Note, Python 3 interpreter with tkinter support is required to run the GUI frontend.

from https://github.com/mezantrop/ts-warp

No comments:

Post a Comment