Proxy support
This commit is contained in:
parent
af4d98b8dd
commit
96fb2fd428
|
@ -14,3 +14,9 @@
|
||||||
|
|
||||||
# JSON cache, used on Helpers\CacheEngines\JSONCache
|
# JSON cache, used on Helpers\CacheEngines\JSONCache
|
||||||
# API_CACHE_JSON=/tmp/proxitok_api # Path for JSON API Cache, leave commented for ./cache/api
|
# API_CACHE_JSON=/tmp/proxitok_api # Path for JSON API Cache, leave commented for ./cache/api
|
||||||
|
|
||||||
|
# Proxy Config
|
||||||
|
# PROXY_HOST=http://EXAMPLE_IP # Host to be used as proxy, make sure to type a valid protocol. Available: http:// | https:// | socks4:// | socks5://
|
||||||
|
# PROXY_PORT=8080
|
||||||
|
# PROXY_USERNAME=username
|
||||||
|
# PROXY_PASSWORD=password
|
||||||
|
|
|
@ -71,6 +71,20 @@ class Wrappers {
|
||||||
'close_when_done' => false
|
'close_when_done' => false
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// -- PROXY CONFIG -- //
|
||||||
|
$proxy_host = Misc::env('PROXY_HOST', '');
|
||||||
|
$proxy_port = Misc::env('PROXY_PORT', '');
|
||||||
|
|
||||||
|
if ($proxy_host && $proxy_port) {
|
||||||
|
$options['proxy'] = [
|
||||||
|
'host' => $proxy_host,
|
||||||
|
'port' => $proxy_port,
|
||||||
|
'username' => Misc::env('PROXY_USERNAME', null),
|
||||||
|
'password' => Misc::env('PROXY_PASSWORD', null)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// Cache config
|
// Cache config
|
||||||
$cacheEngine = null;
|
$cacheEngine = null;
|
||||||
if (isset($_ENV['API_CACHE'])) {
|
if (isset($_ENV['API_CACHE'])) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "pablouser1/proxitok",
|
"name": "pablouser1/proxitok",
|
||||||
"description": "An alternative frontend for TikTok",
|
"description": "An alternative frontend for TikTok",
|
||||||
"version": "2.4.0.0",
|
"version": "2.4.1.0",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
14
composer.lock
generated
14
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "521fa35e5864d7a4542823e1f4838018",
|
"content-hash": "a7e4990ac4c1935a8cdc93939bf26dc9",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bramus/router",
|
"name": "bramus/router",
|
||||||
|
@ -263,16 +263,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pablouser1/tikscraper",
|
"name": "pablouser1/tikscraper",
|
||||||
"version": "v2.2.1.0",
|
"version": "v2.2.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pablouser1/TikScraperPHP.git",
|
"url": "https://github.com/pablouser1/TikScraperPHP.git",
|
||||||
"reference": "53024570fe8a0258d911e5a245fe582090739a19"
|
"reference": "535ed6db108c9a0ec41b271bea8a6a10700cc5d7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/53024570fe8a0258d911e5a245fe582090739a19",
|
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/535ed6db108c9a0ec41b271bea8a6a10700cc5d7",
|
||||||
"reference": "53024570fe8a0258d911e5a245fe582090739a19",
|
"reference": "535ed6db108c9a0ec41b271bea8a6a10700cc5d7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -304,9 +304,9 @@
|
||||||
"description": "Get data from TikTok API",
|
"description": "Get data from TikTok API",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
|
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
|
||||||
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.2.1.0"
|
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v2.2.1.1"
|
||||||
},
|
},
|
||||||
"time": "2022-08-17T12:43:32+00:00"
|
"time": "2022-09-03T11:19:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-webdriver/webdriver",
|
"name": "php-webdriver/webdriver",
|
||||||
|
|
Loading…
Reference in a new issue