Commit Graph

6 Commits

Author SHA1 Message Date
Diederik de Groot
3621e1d6e6 Add composer and phing dependency
Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
2020-03-18 09:05:01 +01:00
Diederik de Groot
a36f459be2 - renamed tftproot => data
- Added strict_types=1
- Added NameSpaces
- Fixed config::replaceSubdirTreeStructure function
- Fix tftp server

Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
2020-03-17 12:29:06 +01:00
Diederik de Groot
745676bf53 - Refactored lib/config.php to use classes
- Added comments to config.php to clarify use

Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
2020-03-17 12:17:39 +01:00
Diederik de Groot
c46dd2f134 - Partial redesigned of resolver away from exceptions and returning ERROR Values instead
- Simplification of tftp_provisioner.php
- Refactored the filename cache into standalone abstract class which can be implemented using different backends
- Check cache for duplicate files when adding and report

Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
2020-03-17 12:17:14 +01:00
Diederik de Groot
7aa4524b19 - Copied github.com/tm1000/tftpserver/tftpserver.php over to lib/tftpserver.php
- Replaced logging functions with lib/logger.php
- First step for adding templated settings/file where placeholders can be filled out.
- Add 'settings' structure to config.ini
- Add 'settings' multidimensional config parser to lib/utils.php
- Added simple test implementation of tftpserver
- Renamed lib/tftpserver.php to lib/tftp.php
- Fixed error output from lib/tftp.php
- Note: current simple tftpserver.php test implementation stores/read files
- from memory (not fs). So you need to put a file, before you can get that
  file back.
- Cleanup some small config details
- First simple implementation of tftp_provisioner.php
2020-03-17 12:16:26 +01:00
Diederik de Groot
a4ebaee776 Initial checkin of resolver.php
- use \\ instead of just \ in FileName
- Use file_put_contents instead of open/write
- Use file_exist instead of stat
- Added /lib directory
- Moved /tftpboot/index.cfg -> /config.ini
- Moved /tftpboot/resolver.php -> /lib/resolver.php
- Added /lib/config.php
  - include /lib/config.php in resolver.php and index.php
- Changed $config array
- Remove print_r($config['main']['base_path']) from config.php
- Add isValidRequest() function
- Use Boolean in tree_base data
- Simplify config['subdirs'] substitution
- Add lib/utils.php file
- Added simple shell/utf/html escape checking
- Added a collection of test cases (we need some more escape checking ones)
- Added lib/logger.php (copied from tftpserver.php, so that it can be reused for that).
- Clarify config.ini logformat
- Update logger implementation
- Replaced index.php with version that uses lib/resolver.php
- Replaced ../etc/nginx/sites-available/tftpboot Example file
2020-03-17 10:03:55 +01:00