Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webcache

Simple Web Cache Server

It stores remote web items, so you may use them then without worrying about original availability.

Just use URL http://your_webcache_instance?url=https://example.com/example.jpg instead https://example.com/example.jpg .

Run

./webcache -i :8080 -p passwords.json path_to_store

passwords.json:

{"my_username": "my_password"}

But I recommend protecting your instance with Nginx with SSL and some request size limiting.

Usage

If you use a browser and webcache runs with passwords file: Firstly, visit to main page to authorize.

Store and get remote item from webcache:

curl -u my_username:my_password 'http://localhost:8080?url=https://example.com/example.jpg'

Get item from webcache if it exists (and webcache runs with passwords file):

curl 'http://localhost:8080?url=https://example.com/example.jpg'

Store remote item for 10 hours and get it from webcache:

curl -u my_username:my_password 'http://localhost:8080?url=https://example.com/example.jpg&ttl=10h'

Store large remote item in background:

curl -u my_username:my_password 'http://localhost:8080?url=https://example.com/big_example.jpg&background'

Delete item from webcache:

curl -u my_username:my_password -X DELETE 'http://localhost:8080?url=https://example.com/example.jpg'

Put local item to webcache:

curl -u my_username:my_password -T local_example.jpg 'http://localhost:8080?url=https://example.com/example.jpg'

About

Simple Web Cache Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages