mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-14 22:15:55 +00:00
wip
This commit is contained in:
@@ -17,6 +17,8 @@ class ShareCommand extends Command
|
|||||||
{
|
{
|
||||||
(new Factory())
|
(new Factory())
|
||||||
->setLoop(app(LoopInterface::class))
|
->setLoop(app(LoopInterface::class))
|
||||||
|
//->setHost('beyond.sh')
|
||||||
|
//->setPort(8080)
|
||||||
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
|
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
|
||||||
->createHttpServer()
|
->createHttpServer()
|
||||||
->run();
|
->run();
|
||||||
|
|||||||
@@ -37,12 +37,10 @@ class Connection
|
|||||||
$appName = config('app.name');
|
$appName = config('app.name');
|
||||||
$appVersion = config('app.version');
|
$appVersion = config('app.version');
|
||||||
|
|
||||||
return str_replace(
|
$data = preg_replace('/Host: '.$this->subdomain.'.'.$serverHost.'(.*)\r\n/', "Host: {$this->host}\r\n" .
|
||||||
"Host: {$this->subdomain}.{$serverHost}:{$port}\r\n",
|
|
||||||
"Host: {$this->host}\r\n" .
|
|
||||||
"X-Tunnel-By: {$appName} {$appVersion}\r\n" .
|
"X-Tunnel-By: {$appName} {$appVersion}\r\n" .
|
||||||
"X-Original-Host: {$this->subdomain}.{$serverHost}:{$port}\r\n",
|
"X-Original-Host: {$this->subdomain}.{$serverHost}:{$port}\r\n", $data);
|
||||||
$data
|
|
||||||
);
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user