Skip to content
Source code for the Mudlet Snapshot Service.
PHP HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib add scafolding for Up/Down logs. Jul 8, 2019
tpl Add filters and seperate display for PR/non-PR snapshot files. Aug 23, 2019
wp-plugin/mudlet-snapshots
.htaccess
README.md Initial commit of working code. Jun 30, 2019
config.php config default for file lifetime default and config tidy. Jul 13, 2019
cron.php
index.php
ip_list Initial commit of working code. Jun 30, 2019
json.php Align paramater and field names for consistency. Aug 20, 2019
knock.php remove unused code from /knock/ Jun 30, 2019
put.php add config value for default file lifetime. Jul 13, 2019
robots.txt Add robot deterrent meta data / robots.txt Jul 20, 2019

README.md

Mudlet Snapshots Service

This software repository powers the Mudlet Snapshot portal and functions required to enable more reliable and customized storage of Mudlet's various CI builds.

Usage

File uploads can be accomplished as follows:
curl --upload-file ./test.gz https://make.mudlet.org/snapshots/test.gz
-or-
wget --method PUT --body-file="./test.gz" "https://make.mudlet.org/snapshots/test.gz" -O - -q

Both will return a link similar to this:
https://make.mudlet.org/snapshots/9162c7/test.gz

With Authentication required:
curl -u user:pass --upload-file ./test.gz https://make.mudlet.org/snapshots/test.gz
-or-
wget --user=username --password=pass --method PUT --body-file="./test.gz" "https://make.mudlet.org/snapshots/test.gz" -O - -q

Additional Headers may also be sent with PUT requests:
Max-Days - Controls the expiration time of the uploaded file.
Max-Downloads - Controls expiration based on File Downloads as well as time, whichever happens first.

To test access to Snapshots use:
https://make.mudlet.org/snapshots/knock/
- Returns: Known
- Returns: Unknown - <IP>

Installation Requirements

This software is powered by PHP and Apache with Mod_Rewrite. Most Apache configurations may disable PUT method requests by default, so we need to make some configuration changes to Apache (in Server or VirtualHost areas) in order to enable PUT method requests as well as configure our RewriteMap directive for mod_rewrite. The required Apache Directives should be something similar to this:

RewriteMap allowed "txt:/path/to/ip_list"
<Limit GET POST HEAD PUT OPTIONS>
    Require all granted
</Limit>
<LimitExcept GET POST HEAD PUT OPTIONS>
    Require all denied
</LimitExcept>
Script PUT /path/to/put.php
You can’t perform that action at this time.