Added custom server host ability

This commit is contained in:
Marcel Pociot committed 2021-06-01 21:19:12 +02:00
1 parent 5e54d0a80f
commit 44b100b340
13 files changed
+116 -44

No files matched your search

+6 -2
View File
@@ -7,7 +7,7 @@ use React\EventLoop\LoopInterface;
class ShareCommand extends ServerAwareCommand
{
protected $signature = 'share {host} {--subdomain=} {--auth=} {--dns=}';
protected $signature = 'share {host} {--subdomain=} {--auth=} {--dns=} {--domain=}';
protected $description = 'Share a local url with a remote expose server';
@@ -29,7 +29,11 @@ class ShareCommand extends ServerAwareCommand
->setPort($this->getServerPort())
->setAuth($auth)
->createClient()
->share($this->argument('host'), explode(',', $this->option('subdomain')))
->share(
$this->argument('host'),
explode(',', $this->option('subdomain')),
$this->option('domain')
)
->createHttpServer()
->run();
}
@@ -4,7 +4,7 @@ namespace App\Commands;
class ShareCurrentWorkingDirectoryCommand extends ShareCommand
{
protected $signature = 'share-cwd {host?} {--subdomain=} {--auth=} {--dns=}';
protected $signature = 'share-cwd {host?} {--subdomain=} {--auth=} {--dns=} {--domain=}';
public function handle()
{
+3 -2
View File
@@ -7,7 +7,7 @@ use React\EventLoop\LoopInterface;
class ShareFilesCommand extends ServerAwareCommand
{
protected $signature = 'share-files {folder=.} {--name=} {--subdomain=} {--auth=}';
protected $signature = 'share-files {folder=.} {--name=} {--subdomain=} {--auth=} {--domain=}';
protected $description = 'Share a local folder with a remote expose server';
@@ -28,7 +28,8 @@ class ShareFilesCommand extends ServerAwareCommand
->shareFolder(
$this->argument('folder'),
$this->option('name') ?? '',
explode(',', $this->option('subdomain'))
explode(',', $this->option('subdomain')),
$this->option('domain')
)
->createHttpServer()
->run();