Skip to content

Maybe the tiniest HTTP proxy that also has a cache

License

Notifications You must be signed in to change notification settings

kokizzu/proxy1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-http-proxy

Maybe the tiniest HTTP proxy that also has a cache.

The tiny-http-proxy acts as a reverse proxy for one server of your choice illustrated by this picture:

           network            proxy             cache
         .---------.       .---------.       .---------.
    <----|- - < - -|---<---|- - < - -|---<---|- < -.   |
you ---->|- - > - -|--->---|- -,- > -|--->---|- > -|   |
         |         |       |   |(*)  |       |     |   |
         |    ,-< -|---<---|< -'     |       |     |   |
         |    , ,->|--->---|- - > - -|--->---|- > -'   |
         `----+-+--´       `---------´       `---------´
              ' '
              '_'
            website

(*) When the data is not in the cache, the website will be requested and is directly stored in the cache.

Where "network" may be anything (LAN/WAN/...).

Installation

Just clone this repo and run it:

git clone https://github.com/kokizzu/tiny-http-proxy.git
cd tiny-http-proxy
go run *.go

Note

  • WARNING: Does not work for https '__')
  • Caching code from the forked repo
  • Other code from Yuwu's gist

About

Maybe the tiniest HTTP proxy that also has a cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%