Config fix, updated README
This commit is contained in:
parent
8a317800ef
commit
53c70b72ce
@ -6,14 +6,17 @@ Socks5 proxy written in PHP based on [workerman](https://github.com/walkor/Worke
|
|||||||
|
|
||||||
2. ```composer install```
|
2. ```composer install```
|
||||||
|
|
||||||
|
## Config
|
||||||
|
Edit file ```config.php```
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
php start.php start -d
|
```php start.php start -d```
|
||||||
|
|
||||||
## Stop
|
## Stop
|
||||||
php start.php stop
|
```php start.php stop```
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
php start.php status
|
```php start.php status```
|
||||||
|
|
||||||
## Other links
|
## Other links
|
||||||
https://github.com/walkor/shadowsocks-php
|
https://github.com/walkor/shadowsocks-php
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
$AUTH_ENABLED = 0;
|
$AUTH_ENABLED = 0;
|
||||||
$USERNAME = 'changeme';
|
$USERNAME = 'changeme';
|
||||||
$PASSWORD = '1234';
|
$PASSWORD = '1234';
|
||||||
|
@ -6,7 +6,6 @@ use \Workerman\Connection\AsyncTcpConnection;
|
|||||||
|
|
||||||
// 自动加载类
|
// 自动加载类
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/autoload.php';
|
||||||
|
|
||||||
require_once __DIR__ . '/config.php';
|
require_once __DIR__ . '/config.php';
|
||||||
|
|
||||||
define('STAGE_INIT', 0);
|
define('STAGE_INIT', 0);
|
||||||
@ -37,6 +36,7 @@ $worker->onConnect = function($connection)
|
|||||||
};
|
};
|
||||||
$worker->onMessage = function($connection, $buffer)
|
$worker->onMessage = function($connection, $buffer)
|
||||||
{
|
{
|
||||||
|
global $AUTH_ENABLED, $USERNAME, $PASSWORD;
|
||||||
switch($connection->stage)
|
switch($connection->stage)
|
||||||
{
|
{
|
||||||
case STAGE_INIT:
|
case STAGE_INIT:
|
||||||
|
Loading…
Reference in New Issue
Block a user