Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"php": ">=5.4",
"clue/http-proxy-react": "^1.1",
"clue/socks-react": "^0.8.2",
"react/http": "^0.7",
"react/http": "^0.7.1",
"react/http-client": "^0.5"
},
"require-dev": {
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/acceptance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ out=$(curl -v --head --silent --fail --proxy http://127.0.0.1:8180 http://test.i
out=$(curl -v --head --silent --fail --proxy http://127.0.0.1:8180 https://test.invalid/test 2>&1) && echo "FAIL: $out" && exit 1 || echo OK
out=$(curl -v --head --silent --fail --proxy socks://127.0.0.1:8180 http://test.invalid/test 2>&1) && echo "FAIL: $out" && exit 1 || echo OK

# manual protocol tests (direct and through HTTP CONNECT to self)
out=$(bash -c "echo -n -e \"GET /pac HTTP/1.1\r\n\r\n\"" | nc localhost 8180 2>&1) && echo "$out" | grep -q "200 OK" && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(bash -c "echo -n -e \"CONNECT 127.0.0.1:8180 HTTP/1.1\r\n\r\n\";sleep 1; echo -n -e \"GET /pac HTTP/1.1\r\n\r\n\"" | nc localhost 8180 2>&1) && echo "$out" | grep -q "200 OK" && echo OK || (echo "FAIL: $out" && exit 1) || exit 1

# restart LeProxy with authentication required
killall php 2>&- 1>&-s || true
php leproxy.php user:[email protected]:8180 &
Expand Down