michaelesmith / dyndns-kit Goto Github PK
View Code? Open in Web Editor NEWa framework for creating a dyn dns compatible server
License: MIT License
a framework for creating a dyn dns compatible server
License: MIT License
trying the basic usage example, my failed?
/var/ directory exists and is writeable
PHP 7.3
request: https://testuser:s3cret@localhost/dyndns/update.php?hostname=test.example.com
error:
PHP Fatal error: Uncaught RuntimeException: No handler could be found to handle the current request in /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php:59\nStack trace:\n#0 /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php(43): DynDNSKit\\Server->doExecute(Object(Symfony\\Component\\HttpFoundation\\Request))\n#1 /var/www/html/dyndns/update.php(27): DynDNSKit\\Server->execute(Object(Symfony\\Component\\HttpFoundation\\Request))\n#2 {main}\n thrown in /var/www/html/dyndns/vendor/michaelesmith/dyndns-kit/src/Server.php on line 59
update.php:
<?php
use DynDNSKit\Authenticator\AuthenticatorException;
use DynDNSKit\Authenticator\HttpBasicAuthenticator;
use DynDNSKit\Authenticator\User\RegexUser;
use DynDNSKit\Handler\GenericHandler;
use DynDNSKit\Handler\HandlerException;
use DynDNSKit\Processor\JsonProcessor;
use DynDNSKit\Processor\ProcessorException;
use DynDNSKit\Server;
use DynDNSKit\Transformer\DynDNSTransformer;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
require_once __DIR__.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php';
$server = new Server(
[
new GenericHandler(
new DynDNSTransformer(),
new HttpBasicAuthenticator([new RegexUser('testuser', 's3cret', '.+')]),
new JsonProcessor(__DIR__.'/var/dns.json')
),
]
);
$server->execute(Request::createFromGlobals());
```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.