Config fix, updated README

This commit is contained in:
Marek Rost 2018-06-19 18:11:41 +02:00
parent 8a317800ef
commit 53c70b72ce
3 changed files with 11 additions and 6 deletions

View File

@ -6,14 +6,17 @@ Socks5 proxy written in PHP based on [workerman](https://github.com/walkor/Worke
2. ```composer install```
## Config
Edit file ```config.php```
## Start
php start.php start -d
```php start.php start -d```
## Stop
php start.php stop
```php start.php stop```
## Status
php start.php status
```php start.php status```
## Other links
https://github.com/walkor/shadowsocks-php

View File

@ -1,3 +1,5 @@
<?php
$AUTH_ENABLED = 0;
$USERNAME = 'changeme';
$PASSWORD = '1234';

View File

@ -6,7 +6,6 @@ use \Workerman\Connection\AsyncTcpConnection;
// 自动加载类
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/config.php';
define('STAGE_INIT', 0);
@ -37,6 +36,7 @@ $worker->onConnect = function($connection)
};
$worker->onMessage = function($connection, $buffer)
{
global $AUTH_ENABLED, $USERNAME, $PASSWORD;
switch($connection->stage)
{
case STAGE_INIT: