/ChilipepprOfflineProxy

Allow Chilipeppr to run on machines with no Internet connection, such as shop floor.

Primary LanguagePerlMIT LicenseMIT

ChilipepprOfflineProxy

Allow Chilipeppr to run without an Internet connection.

Table of Contents

Quick Setup (TL;DR)

  1. Install proxy binary (and/or source) on an Internet connected machine.
  2. Run proxy with the -offline flag, launch browser, clear browser cache, and launch chilipeppr.com/tinyg
    Expect much slower load than normal; retry if timouts or other errors.
  3. Copy the OfflineHTML directory (and the ChilipepprOffline executable) to the non Internet connected machine.
  4. Run proxy with -offline flag, lauch browser, and launch chilipeppr.com/tinyg

Installation

  1. Windows
  • Download the .zip file and extract ChilipepprProxy.exe. Put it where you can find it.
  • Create a directory called "C:\OfflineHTML". Other names and/or locations are acceptable by specifying a flag at runtime (see #Usage)
  1. Linux
  • Download the PERL source. Put it where you can find it.
  • Add something like #!/usr/local/bin/perl as the first line of the file
  1. Mac OSX
  • Coming Soon. If you already know how to run PERL programs from the command line on your Mac, go for it!
  1. Other
  • Do whatever it takes to run a PERL program on your platform.

Usage

chilipeppr.pl -h  
Chilipeppr Proxy: Command line flag -offline or -online required; all other flags optional.  
Flags are:  
  -online
  -offline  
  -pathprefix=   Directory path used to save files when online, or serve them when offline. Read/Write access required.   Anything that works on your OS is acceptable. 
  -proxyport=    Port number that goes in browser proxy config. 
  -noauto        Supresses auto-config of Browser Proxy and clear of Browser Cache. Use only if these are causing problems.  
  -noanim        Supresses backspaces used for animation of console.  
  -v             Verbosity. Supplying one or more -v flags prints additional diagnostic information.  

Flags explained:

  1. -online
    Requests are fetched from the Internet AND stored in local files for later use.
  2. -offline
    Requests are fetched from local files only. If a file cannot be found, a 404 "Not Found" HTML page is returned.
  3. -pathprefix=
    The location where files will be created and stored or fetched.
  • Read/Write access requried for -online mode. Also must be able to create new directories and new files.
  • Read access is find for -offline mode.
  • Default is "/OfflineHTML"
  1. -noauto
  • When running on Windows, an attempt is made to auto-confiure the Windows proxy settings. These are the same settings controlled by the "Lan Settings" dialog in Internet Explorer. These tend to affect all clients on Windows, so it is a good idea to not run much else when capturing the online session.
  • The proxy attempts to put activate this configuration when starting, and remove it when cleanly stopping. If the proxy crashes, it may be easist to re-start it, and cleanly stop it (Ctl-C) to turn these settings off. You can also use the dialog in Internet Explorer, or you can click start and type "Configure Proxy Server" and press enter.
  • Other platforms: Configure your proxy as appropriate.
  • Default configuration is an IP address of "127.0.0.1" in the hostname field, and "8888" in the port number field.
  1. -proxyport=
  • This is the port the browser should use in proxy settings. Default is 8888.
  1. -noanim
  • Some parts of the console interface use backspaces (\b) to overtype, and therefore animiate. Specifying this flag supresses all use of backspaces (and therefore all animation). Useful if redirecting STDOUT and/or STDERR to a file.

Support

Currently in ALPHA TEST, do not expect any stability.

When problems occur (and they will), please include a capture of the command line session where the proxy is running, and a copy of the browser console log (F12 to access this in most browsers).

Discussion thread here: (coming soon, link to google group)

Rationale

When I discovered Chilipeppr and showed it to others, the number one question was "Will it run offline?"

Thanks to the contributors:

ToDo

  • Allow both -online and -offline to be specified. -offline will cause the proxy to service requests from content in local files, just like normal. Additionally specifying the -online flag will direct the proxy to attempt an online fetch if the local file is not found. Useful for "fill in the gaps".

##Contributing Contact me to join the project, and/or clone and create a pull request when you are ready.

License

See LICENSE