bind(CliRequestLogger::class, function () { return new CliRequestLogger(new ConsoleOutput()); }); return $this; } public function handle() { $this->configureConnectionLogger(); $serverHost = $this->option('server-host') ?? config('expose.host', 'localhost'); $serverPort = $this->option('server-port') ?? config('expose.port', 8080); $auth = $this->option('auth') ?? config('expose.auth_token', ''); if (strstr($this->argument('host'), 'host.docker.internal')) { config(['expose.dns' => true]); } if ($this->option('dns') !== null) { config(['expose.dns' => empty($this->option('dns')) ? true : $this->option('dns')]); } (new Factory()) ->setLoop(app(LoopInterface::class)) ->setHost($serverHost) ->setPort($serverPort) ->setAuth($auth) ->createClient() ->share($this->argument('host'), explode(',', $this->option('subdomain'))) ->createHttpServer() ->run(); } }