A socks5 proxy to build your own shadowsocks private network. PHP based & Composer supported.
- TCP/UDP support
- IPV4/DOMAINNAME/IPV6 support
- Graceful restart
- Monolog Logger
- Guarder(Black List)
- Server Manager
- bandwidth throttling
- user management
composer require ycgambo/shadowrocket
- Composer
- PHP 5.3+
<?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);
<?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.
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