This commit is contained in:
Marcel Pociot committed 2020-04-14 22:41:46 +02:00
1 parent 87d254db63
commit e49708b290
2 files changed
+6 -6

No files matched your search

+2
View File
@@ -17,6 +17,8 @@ class ShareCommand extends Command
{
(new Factory())
->setLoop(app(LoopInterface::class))
//->setHost('beyond.sh')
//->setPort(8080)
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
->createHttpServer()
->run();
+4 -6
View File
@@ -37,12 +37,10 @@ class Connection
$appName = config('app.name');
$appVersion = config('app.version');
return str_replace(
"Host: {$this->subdomain}.{$serverHost}:{$port}\r\n",
"Host: {$this->host}\r\n" .
$data = preg_replace('/Host: '.$this->subdomain.'.'.$serverHost.'(.*)\r\n/', "Host: {$this->host}\r\n" .
"X-Tunnel-By: {$appName} {$appVersion}\r\n" .
"X-Original-Host: {$this->subdomain}.{$serverHost}:{$port}\r\n",
$data
);
"X-Original-Host: {$this->subdomain}.{$serverHost}:{$port}\r\n", $data);
return $data;
}
}