mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-14 14:05:54 +00:00
Compare commits
5 Commits
fix-http-p
...
1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff232d9ef4 | ||
|
|
5b8cc4d985 | ||
|
|
26a805c552 | ||
|
|
28cc353c30 | ||
|
|
7bfb618d93 |
@@ -21,3 +21,4 @@ ENV password=password
|
|||||||
ENV exposeConfigPath=/src/config/expose.php
|
ENV exposeConfigPath=/src/config/expose.php
|
||||||
|
|
||||||
CMD sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath} && php expose serve ${domain} --port ${port} --validateAuthTokens
|
CMD sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath} && php expose serve ${domain} --port ${port} --validateAuthTokens
|
||||||
|
ENTRYPOINT ["/src/expose"]
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Client
|
|||||||
$sharedUrl = $this->prepareSharedUrl($sharedUrl);
|
$sharedUrl = $this->prepareSharedUrl($sharedUrl);
|
||||||
|
|
||||||
foreach ($subdomains as $subdomain) {
|
foreach ($subdomains as $subdomain) {
|
||||||
$this->connectToServer($sharedUrl, $subdomain, config('expose.auth_token'));
|
$this->connectToServer($sharedUrl, $subdomain, $this->configuration->auth());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ class HttpClient
|
|||||||
protected function createConnector(): Connector
|
protected function createConnector(): Connector
|
||||||
{
|
{
|
||||||
return new Connector($this->loop, [
|
return new Connector($this->loop, [
|
||||||
'dns' => '127.0.0.1',
|
|
||||||
'tls' => [
|
'tls' => [
|
||||||
'verify_peer' => false,
|
'verify_peer' => false,
|
||||||
'verify_peer_name' => false,
|
'verify_peer_name' => false,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
|||||||
|
|
||||||
class ShareCommand extends Command
|
class ShareCommand extends Command
|
||||||
{
|
{
|
||||||
protected $signature = 'share {host} {--subdomain=} {--auth=}';
|
protected $signature = 'share {host} {--subdomain=} {--auth=} {--server-host=} {--server-port=}';
|
||||||
|
|
||||||
protected $description = 'Share a local url with a remote expose server';
|
protected $description = 'Share a local url with a remote expose server';
|
||||||
|
|
||||||
@@ -27,11 +27,15 @@ class ShareCommand extends Command
|
|||||||
{
|
{
|
||||||
$this->configureConnectionLogger();
|
$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', '');
|
||||||
|
|
||||||
(new Factory())
|
(new Factory())
|
||||||
->setLoop(app(LoopInterface::class))
|
->setLoop(app(LoopInterface::class))
|
||||||
->setHost(config('expose.host', 'localhost'))
|
->setHost($serverHost)
|
||||||
->setPort(config('expose.port', 8080))
|
->setPort($serverPort)
|
||||||
->setAuth($this->option('auth'))
|
->setAuth($auth)
|
||||||
->createClient()
|
->createClient()
|
||||||
->share($this->argument('host'), explode(',', $this->option('subdomain')))
|
->share($this->argument('host'), explode(',', $this->option('subdomain')))
|
||||||
->createHttpServer()
|
->createHttpServer()
|
||||||
|
|||||||
Reference in New Issue
Block a user