Skip to content

A socks5 proxy to build your own shadowsocks private network. PHP based & Composer supported.

License

Notifications You must be signed in to change notification settings

ycgambo/shadowrocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shadowrocket

A socks5 proxy to build your own shadowsocks private network. PHP based & Composer supported.

中文文档 Contributing

Features

  1. TCP/UDP support
  2. IPV4/DOMAINNAME/IPV6 support
  3. Graceful restart
  4. Monolog Logger
  5. Guarder(Black List)
  6. Server Manager

Coming Next

  • bandwidth throttling
  • user management

Install

composer require ycgambo/shadowrocket

Requirements

  1. Composer
  2. PHP 5.3+

Usage

Run a server

<?php
require_once __DIR__ . '/vendor/autoload.php';

$config = array(
    'server' => array(
        'port'        => '8388',
        'password'    => 'mypass',
        'encryption'  => 'aes-256-cfb',
        'process_num' => 12,
    ),
);

ShadowRocket\Bin\Launcher::launch($config);

Run a local proxy

<?php
require_once __DIR__ . '/vendor/autoload.php';

$config = array(
    'local' => array(
        'server'      => '123.456.78.9',
        'port'        => '8388',
        'password'    => 'mypass',
        'encryption'  => 'aes-256-cfb',
        'local_port'  => '1086',
        'process_num' => 12,
    )
);

ShadowRocket\Bin\Launcher::launch($config);

This means we want to pass data to local proxy 127.0.0.1:1086 which will request proxy server 123.456.78.9:8388 for reply.

Fire your script up

Assuming your script is named as start.php, in which contains code to launch the Launcher.

To run as daemon:

php start.php start -d

To stop your script:

php start.php stop

To graceful restart:

php start.php reload

To check status:

php start.php status

To check connections:

php start.php connections

More docs

Want a client APP?

About

A socks5 proxy to build your own shadowsocks private network. PHP based & Composer supported.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages