14 Commits

Author SHA1 Message Date
René Preuß
763b45a77e Remove rewrite header 2021-01-01 20:13:08 +01:00
René Preuß
f137ea298b Fix prepare method to generate a valid dsn 2021-01-01 20:07:18 +01:00
René Preuß
2f457352c5 Undo test rename 2021-01-01 17:28:10 +01:00
René Preuß
c5cdd8c352 Fix style ci 2021-01-01 16:55:52 +01:00
René Preuß
6f72d719bf Fix http/s protocol headers
Improve request ids
2021-01-01 16:06:59 +01:00
Siebe Vanden Eynden
f6d04777e1 Allow custom config file path (#145)
* allow custom config file path

* Update configuration.md
2020-12-04 22:45:29 +01:00
Tii
bded9f754e Added command line options for server-host and server-port (#147)
* Added server options

* Restored box.json

* Reverted build and versioning...

* Please the style gods
2020-12-04 22:44:25 +01:00
Tii
c92d4b258c Removed fixed IP address for DNS (#148) 2020-12-04 22:39:57 +01:00
Marcel Pociot
eb8d1f4f91 Merge pull request #154 from beyondcode/analysis-5ZodwW
Apply fixes from StyleCI
2020-11-01 20:34:40 +01:00
Marcel Pociot
da39fb8ad8 Apply fixes from StyleCI 2020-11-01 19:34:33 +00:00
Marcel Pociot
5b7a80bb0c Merge branch 'master' of github.com:beyondcode/phunnel 2020-11-01 20:34:21 +01:00
Marcel Pociot
f5c009eadd Merge pull request #153 from beyondcode/analysis-7ao7E3
Apply fixes from StyleCI
2020-11-01 17:47:36 +01:00
Marcel Pociot
7459c0189b Apply fixes from StyleCI 2020-11-01 16:47:29 +00:00
Merkhad Luigton
8b8426cd3b make expose directly executable in the docker container (#149) 2020-11-01 17:47:21 +01:00
18 changed files with 59 additions and 506 deletions

View File

@@ -21,3 +21,4 @@ ENV password=password
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
ENTRYPOINT ["/src/expose"]

View File

@@ -45,13 +45,13 @@ class Client
$sharedUrl = $this->prepareSharedUrl($sharedUrl);
foreach ($subdomains as $subdomain) {
$this->connectToServer($sharedUrl, $subdomain, config('expose.auth_token'));
$this->connectToServer($sharedUrl, $subdomain, $this->configuration->auth());
}
}
public function sharePort(int $port)
{
$this->connectToServerAndShareTcp($port, config('expose.auth_token'));
$this->connectToServerAndShareTcp($port, $this->configuration->auth());
}
protected function prepareSharedUrl(string $sharedUrl): string
@@ -60,16 +60,11 @@ class Client
return $sharedUrl;
}
$url = Arr::get($parsedUrl, 'host', Arr::get($parsedUrl, 'path'));
$host = Arr::get($parsedUrl, 'host', Arr::get($parsedUrl, 'path', 'localhost'));
$scheme = Arr::get($parsedUrl, 'scheme', 'http');
$port = Arr::get($parsedUrl, 'port', $scheme === 'https' ? 443 : 80);
if (Arr::get($parsedUrl, 'scheme') === 'https') {
$url .= ':443';
}
if (! is_null($port = Arr::get($parsedUrl, 'port'))) {
$url .= ":{$port}";
}
return $url;
return sprintf('%s://%s:%s', $scheme, $host, $port);
}
public function connectToServer(string $sharedUrl, $subdomain, $authToken = ''): PromiseInterface

View File

@@ -2,7 +2,6 @@
namespace App\Client;
use App\Client\Fileserver\Fileserver;
use App\Client\Http\Controllers\AttachDataToLogController;
use App\Client\Http\Controllers\ClearLogsController;
use App\Client\Http\Controllers\CreateTunnelController;
@@ -34,9 +33,6 @@ class Factory
/** @var App */
protected $app;
/** @var Fileserver */
protected $fileserver;
/** @var RouteGenerator */
protected $router;
@@ -120,15 +116,6 @@ class Factory
return $this;
}
public function shareFolder(string $folder, string $name, $subdomain = null)
{
$host = $this->createFileServer($folder, $name);
$this->share($host, $subdomain);
return $this;
}
protected function addRoutes()
{
$this->router->get('/', DashboardController::class);
@@ -147,18 +134,18 @@ class Factory
}
}
protected function detectNextAvailablePort($startPort = 4040): int
protected function detectNextFreeDashboardPort($port = 4040): int
{
while (is_resource(@fsockopen('127.0.0.1', $startPort))) {
$startPort++;
while (is_resource(@fsockopen('127.0.0.1', $port))) {
$port++;
}
return $startPort;
return $port;
}
public function createHttpServer()
{
$dashboardPort = $this->detectNextAvailablePort();
$dashboardPort = $this->detectNextFreeDashboardPort();
config()->set('expose.dashboard_port', $dashboardPort);
@@ -169,25 +156,11 @@ class Factory
return $this;
}
public function createFileServer(string $folder, string $name)
{
$port = $this->detectNextAvailablePort(8090);
$this->fileserver = new Fileserver($folder, $name, $port, '0.0.0.0', $this->loop);
return "127.0.0.1:{$port}";
}
public function getApp(): App
{
return $this->app;
}
public function getFileserver(): Fileserver
{
return $this->fileserver;
}
public function run()
{
$this->loop->run();

View File

@@ -1,135 +0,0 @@
<?php
namespace App\Client\Fileserver;
use App\Http\Controllers\Concerns\LoadsViews;
use App\Http\QueryParameters;
use GuzzleHttp\Psr7\ServerRequest;
use Illuminate\Http\Request;
use Psr\Http\Message\ServerRequestInterface;
use React\EventLoop\LoopInterface;
use React\Http\Response;
use React\Stream\ReadableResourceStream;
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
class ConnectionHandler
{
use LoadsViews;
/** @var string */
protected $rootFolder;
/** @var string */
protected $name;
/** @var LoopInterface */
protected $loop;
public function __construct(string $rootFolder, string $name, LoopInterface $loop)
{
$this->rootFolder = $rootFolder;
$this->name = $name;
$this->loop = $loop;
}
public function handle(ServerRequestInterface $request)
{
$request = $this->createLaravelRequest($request);
$targetPath = realpath($this->rootFolder.DIRECTORY_SEPARATOR.$request->path());
if (! $this->isValidTarget($targetPath)) {
return new Response(404);
}
if (is_dir($targetPath)) {
// Directory listing
$directoryContent = Finder::create()
->depth(0)
->sort(function ($a, $b) {
return strcmp(strtolower($a->getRealpath()), strtolower($b->getRealpath()));
})
->in($targetPath);
if ($this->name !== '') {
$directoryContent->name($this->name);
}
$parentPath = explode('/', $request->path());
array_pop($parentPath);
$parentPath = implode('/', $parentPath);
return new Response(
200,
['Content-Type' => 'text/html'],
$this->getView(null, 'client.fileserver', [
'currentPath' => $request->path(),
'parentPath' => $parentPath,
'directory' => $targetPath,
'directoryContent' => $directoryContent,
])
);
}
if (is_file($targetPath)) {
return new Response(
200,
['Content-Type' => mime_content_type($targetPath)],
new ReadableResourceStream(fopen($targetPath, 'r'), $this->loop)
);
}
}
protected function isValidTarget(string $targetPath): bool
{
if (! file_exists($targetPath)) {
return false;
}
if ($this->name !== '') {
$filter = new class(basename($targetPath), [$this->name]) extends FilenameFilterIterator {
protected $filename;
public function __construct(string $filename, array $matchPatterns)
{
$this->filename = $filename;
foreach ($matchPatterns as $pattern) {
$this->matchRegexps[] = $this->toRegex($pattern);
}
}
public function accept()
{
return $this->isAccepted($this->filename);
}
};
return $filter->accept();
}
return true;
}
protected function createLaravelRequest(ServerRequestInterface $request): Request
{
try {
parse_str($request->getBody(), $bodyParameters);
} catch (\Throwable $e) {
$bodyParameters = [];
}
$serverRequest = (new ServerRequest(
$request->getMethod(),
$request->getUri(),
$request->getHeaders(),
$request->getBody(),
$request->getProtocolVersion(),
))
->withQueryParams(QueryParameters::create($request)->all())
->withParsedBody($bodyParameters);
return Request::createFromBase((new HttpFoundationFactory)->createRequest($serverRequest));
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Client\Fileserver;
use Psr\Http\Message\ServerRequestInterface;
use React\EventLoop\LoopInterface;
use React\Http\Server;
use React\Socket\Server as SocketServer;
class Fileserver
{
/** @var SocketServer */
protected $socket;
public function __construct($rootFolder, $name, $port, $address, LoopInterface $loop)
{
$server = new Server(function (ServerRequestInterface $request) use ($rootFolder, $name, $loop) {
return (new ConnectionHandler($rootFolder, $name, $loop))->handle($request);
});
$this->socket = new SocketServer("{$address}:{$port}", $loop);
$server->listen($this->socket);
}
public function getSocket(): SocketServer
{
return $this->socket;
}
}

View File

@@ -11,10 +11,12 @@ use function GuzzleHttp\Psr7\str;
use Laminas\Http\Request;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriInterface;
use Ratchet\Client\WebSocket;
use Ratchet\RFC6455\Messaging\Frame;
use React\EventLoop\LoopInterface;
use React\Socket\Connector;
use React\Stream\ReadableStreamInterface;
class HttpClient
{
@@ -74,7 +76,6 @@ class HttpClient
protected function createConnector(): Connector
{
return new Connector($this->loop, [
'dns' => '127.0.0.1',
'tls' => [
'verify_peer' => false,
'verify_peer_name' => false,
@@ -85,22 +86,17 @@ class HttpClient
protected function sendRequestToApplication(RequestInterface $request, $proxyConnection = null)
{
(new Browser($this->loop, $this->createConnector()))
->withOptions([
'followRedirects' => false,
'obeySuccessCode' => false,
'streaming' => true,
])
->send($request)
->withFollowRedirects(false)
->withRejectErrorResponse(false)
->requestStreaming($request->getMethod(), $this->getExposeUri($request), $request->getHeaders(), $request->getBody())
->then(function (ResponseInterface $response) use ($proxyConnection) {
if (! isset($response->buffer)) {
$response = $this->rewriteResponseHeaders($response);
$response->buffer = str($response);
}
$this->sendChunkToServer($response->buffer, $proxyConnection);
/* @var $body \React\Stream\ReadableStreamInterface */
/* @var $body ReadableStreamInterface */
$body = $response->getBody();
$this->logResponse(str($response));
@@ -137,24 +133,14 @@ class HttpClient
return Request::fromString($data);
}
protected function rewriteResponseHeaders(ResponseInterface $response)
private function getExposeUri(RequestInterface $request): UriInterface
{
if (! $response->hasHeader('Location')) {
return $response;
}
$exposeProto = $request->getHeader('x-expose-proto')[0];
$exposeHost = explode(':', $request->getHeader('x-expose-host')[0]);
$location = $response->getHeaderLine('Location');
if (! strstr($location, $this->connectionData->host)) {
return $response;
}
$location = str_replace(
$this->connectionData->host,
$this->configuration->getUrl($this->connectionData->subdomain),
$location
);
return $response->withHeader('Location', $location);
return $request->getUri()
->withScheme($exposeProto)
->withHost($exposeHost[0])
->withPort($exposeHost[1]);
}
}

View File

@@ -10,7 +10,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
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';
@@ -27,11 +27,15 @@ class ShareCommand extends Command
{
$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())
->setLoop(app(LoopInterface::class))
->setHost(config('expose.host', 'localhost'))
->setPort(config('expose.port', 8080))
->setAuth($this->option('auth'))
->setHost($serverHost)
->setPort($serverPort)
->setAuth($auth)
->createClient()
->share($this->argument('host'), explode(',', $this->option('subdomain')))
->createHttpServer()

View File

@@ -4,7 +4,7 @@ namespace App\Commands;
class ShareCurrentWorkingDirectoryCommand extends ShareCommand
{
protected $signature = 'share-cwd {host?} {--subdomain=} {--auth=}';
protected $signature = 'share-cwd {host?} {--subdomain=} {--auth=} {--server-host=} {--server-port=}';
public function handle()
{

View File

@@ -1,48 +0,0 @@
<?php
namespace App\Commands;
use App\Client\Factory;
use App\Logger\CliRequestLogger;
use LaravelZero\Framework\Commands\Command;
use React\EventLoop\LoopInterface;
use Symfony\Component\Console\Output\ConsoleOutput;
class ShareFilesCommand extends Command
{
protected $signature = 'share-files {folder=.} {--name=} {--subdomain=} {--auth=}';
protected $description = 'Share a local folder with a remote expose server';
protected function configureConnectionLogger()
{
app()->bind(CliRequestLogger::class, function () {
return new CliRequestLogger(new ConsoleOutput());
});
return $this;
}
public function handle()
{
if (! is_dir($this->argument('folder'))) {
throw new \InvalidArgumentException('The folder '.$this->argument('folder').' does not exist.');
}
$this->configureConnectionLogger();
(new Factory())
->setLoop(app(LoopInterface::class))
->setHost(config('expose.host', 'localhost'))
->setPort(config('expose.port', 8080))
->setAuth($this->option('auth'))
->createClient()
->shareFolder(
$this->argument('folder'),
$this->option('name') ?? '',
explode(',', $this->option('subdomain'))
)
->createHttpServer()
->run();
}
}

View File

@@ -9,7 +9,7 @@ use Twig\Loader\ArrayLoader;
trait LoadsViews
{
protected function getView(?ConnectionInterface $connection, string $view, array $data = [])
protected function getView(ConnectionInterface $connection, string $view, array $data = [])
{
$templatePath = implode(DIRECTORY_SEPARATOR, explode('.', $view));
@@ -23,10 +23,7 @@ trait LoadsViews
$data = array_merge($data, [
'request' => $connection->laravelRequest ?? null,
]);
try {
return stream_for($twig->render('template', $data));
} catch (\Throwable $e) {
var_dump($e->getMessage());
}
}
}

View File

@@ -37,6 +37,14 @@ class AppServiceProvider extends ServiceProvider
{
$builtInConfig = config('expose');
$keyServerVariable = 'EXPOSE_CONFIG_FILE';
if (array_key_exists($keyServerVariable, $_SERVER) && is_string($_SERVER[$keyServerVariable]) && file_exists($_SERVER[$keyServerVariable])) {
$localConfig = require $_SERVER[$keyServerVariable];
config()->set('expose', array_merge($builtInConfig, $localConfig));
return;
}
$localConfigFile = getcwd().DIRECTORY_SEPARATOR.'.expose.php';
if (file_exists($localConfigFile)) {

View File

@@ -45,15 +45,13 @@ class ConnectionManager implements ConnectionManagerContract
public function storeConnection(string $host, ?string $subdomain, ConnectionInterface $connection): ControlConnection
{
$clientId = (string) uniqid();
$connection->client_id = $clientId;
$connection->client_id = sha1(uniqid('', true));
$storedConnection = new ControlConnection(
$connection,
$host,
$subdomain ?? $this->subdomainGenerator->generateSubdomain(),
$clientId,
$connection->client_id,
$this->getAuthTokenFromConnection($connection)
);

View File

@@ -113,9 +113,13 @@ class TunnelMessageController extends Controller
$host .= ":{$this->configuration->port()}";
}
$request->headers->set('Host', $controlConnection->host);
$exposeUrl = parse_url($controlConnection->host);
$request->headers->set('Host', "{$controlConnection->subdomain}.{$host}");
$request->headers->set('X-Forwarded-Proto', $request->isSecure() ? 'https' : 'http');
$request->headers->set('X-Expose-Request-ID', uniqid());
$request->headers->set('X-Expose-Request-ID', sha1(uniqid('', true)));
$request->headers->set('X-Expose-Host', sprintf('%s:%s', $exposeUrl['host'], $exposeUrl['port']));
$request->headers->set('X-Expose-Proto', $exposeUrl['scheme']);
$request->headers->set('Upgrade-Insecure-Requests', 1);
$request->headers->set('X-Exposed-By', config('app.name').' '.config('app.version'));
$request->headers->set('X-Original-Host', "{$controlConnection->subdomain}.{$host}");

View File

@@ -17,6 +17,12 @@ The configuration file will be written to your home directory inside a `.expose`
`~/.expose/config.php`
You can also provide a custom location of the config file by providing the full path as a server variable.
```bash
EXPOSE_CONFIG_FILE="~/my-custom-config.php" expose share
```
And the default content of the configuration file is this:
```php

View File

@@ -1,93 +0,0 @@
<html lang="en">
<head>
<title>Expose Fileserver</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css">
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.0/build/styles/github.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.0/build/highlight.min.js" async></script>
</head>
<body>
<div id="app" class="">
<div class="relative bg-indigo-600" style="marign-left: -1px">
<div class="max-w-screen-xl mx-auto py-3 px-3 sm:px-6 lg:px-8">
<div class="pr-16 sm:text-center sm:px-16">
<p class="font-medium text-white flex justify-center">
<span class="inline-block font-mono">{{ directory }}</span>
</p>
</div>
</div>
</div>
{% macro bytesToSize(bytes) %}
{% set kilobyte = 1024 %}
{% set megabyte = kilobyte * 1024 %}
{% set gigabyte = megabyte * 1024 %}
{% set terabyte = gigabyte * 1024 %}
{% if bytes < kilobyte %}
{{ bytes ~ ' B' }}
{% elseif bytes < megabyte %}
{{ (bytes / kilobyte)|number_format(2, '.') ~ ' KiB' }}
{% elseif bytes < gigabyte %}
{{ (bytes / megabyte)|number_format(2, '.') ~ ' MiB' }}
{% elseif bytes < terabyte %}
{{ (bytes / gigabyte)|number_format(2, '.') ~ ' GiB' }}
{% else %}
{{ (bytes / terabyte)|number_format(2, '.') ~ ' TiB' }}
{% endif %}
{% endmacro %}
<div class="flex flex-col px-6 py-4">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-6 py-3 bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider">
Name
</th>
<th class="px-6 py-3 bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider">
Date Modified
</th>
<th class="px-6 py-3 bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider">
Size
</th>
</tr>
</thead>
<tbody class="bg-white">
{% if currentPath != '/' %}
<tr class="border-b">
<td colspan="3" class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-mono text-gray-900">
<a href="/{{ parentPath }}" class="text-indigo-600 font-bold hover:text-indigo-900">Back</a>
</td>
</tr>
{% endif %}
{% for item in directoryContent %}
<tr class="{% if loop.index % 2 == 0 %} bg-gray-50 {% endif %}">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-mono text-gray-900">
{% if currentPath != '/' %}
<a href="/{{ currentPath }}/{{ item.getFilename() }}" class="text-indigo-600 hover:text-indigo-900">{{ item.filename }}</a>
{% else %}
<a href="/{{ item.getFilename() }}" class="text-indigo-600 hover:text-indigo-900">{{ item.filename }}</a>
{% endif %}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ item.getMTime() | date("m/d/Y H:i:s") }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{% if item.isDir() %}
-
{% else %}
{{ _self.bytesToSize(item.getSize()) }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,111 +0,0 @@
<?php
namespace Tests\Feature\Client;
use App\Client\Configuration;
use App\Client\Factory;
use Clue\React\Buzz\Browser;
use Clue\React\Buzz\Message\ResponseException;
use Psr\Http\Message\ResponseInterface;
use Tests\Feature\TestCase;
class FileserverTest extends TestCase
{
/** @var Browser */
protected $browser;
/** @var Factory */
protected $clientFactory;
/** @var string */
protected $fileserverUrl;
public function setUp(): void
{
parent::setUp();
$this->browser = new Browser($this->loop);
}
public function tearDown(): void
{
parent::tearDown();
$this->clientFactory->getFileserver()->getSocket()->close();
}
/** @test */
public function accessing_the_fileserver_works()
{
$this->shareFolder(__DIR__);
/** @var ResponseInterface $response */
$response = $this->await($this->browser->get('http://'.$this->fileserverUrl));
$this->assertSame(200, $response->getStatusCode());
}
/** @test */
public function accessing_invalid_files_returns_404()
{
$this->shareFolder(__DIR__);
$this->expectException(ResponseException::class);
$this->expectExceptionMessage(404);
/** @var ResponseInterface $response */
$response = $this->await($this->browser->get('http://'.$this->fileserverUrl.'/invalid-file'));
$this->assertSame(404, $response->getStatusCode());
}
/** @test */
public function it_can_return_filtered_responses()
{
$this->shareFolder(__DIR__.'/../../fixtures', '*.md');
$this->expectException(ResponseException::class);
$this->expectExceptionMessage(404);
/** @var ResponseInterface $response */
$response = $this->await($this->browser->get('http://'.$this->fileserverUrl.'/test.txt'));
$this->assertSame(200, $response->getStatusCode());
$this->assertSame('test-file'.PHP_EOL, $response->getBody()->getContents());
}
/** @test */
public function it_can_return_file_responses()
{
$this->shareFolder(__DIR__.'/../../fixtures');
/** @var ResponseInterface $response */
$response = $this->await($this->browser->get('http://'.$this->fileserverUrl.'/test.txt'));
$this->assertSame(200, $response->getStatusCode());
$this->assertSame('test-file'.PHP_EOL, $response->getBody()->getContents());
}
/** @test */
public function it_can_return_file_responses_for_valid_filtered_files()
{
$this->shareFolder(__DIR__.'/../../fixtures', '*.txt');
/** @var ResponseInterface $response */
$response = $this->await($this->browser->get('http://'.$this->fileserverUrl.'/test.txt'));
$this->assertSame(200, $response->getStatusCode());
$this->assertSame('test-file'.PHP_EOL, $response->getBody()->getContents());
}
protected function shareFolder(string $folder, string $name = '')
{
app()->singleton(Configuration::class, function ($app) {
return new Configuration('localhost', '8080', false);
});
$factory = (new Factory())->setLoop($this->loop);
$this->fileserverUrl = $factory->createFileServer($folder, $name);
$this->clientFactory = $factory;
}
}

View File

@@ -1 +0,0 @@
# Markdown

View File

@@ -1 +0,0 @@
test-file