How GreasySpoon works

GreasySpoon is a network service cooperating with a proxy to make on-the-fly changes to HTML web page content. GreasySpoon can be used for adding new functions to web pages (for example, embedding price comparisons within shopping sites), fixing rendering bugs, combining data from multiple webpages, and numerous other purposes.

Most common uses of GreasySpoon are:
  • Insert/replace custom HTTP headers
  • Enrich and adapt HTML content
  • Filter traffic (block specific content or URLs)
  • Call external custom functions: authentication server, external logging systems,...
In order to do that, GreasySpoon provides a scripting interface supporting several languages: Java, Ecmascript, Ruby, ...
If you are familiar with GreaseMonkey, think about GreasySpoon as a similar solution, but running on the network side instead of on the browser.

What are GreasySpoon Scripts ?

GreasySpoon scripts provide you a very easy way create your services using your prefered language, by hidding all the network processing and giving you high level objects to manipulate. Creation/edition is provided through "Scripts" menu of web administration interface. Two kind of scripts can be defined:
  • Scripts applying on users requests: These scripts allow intercepting and modifying requests made by users to the content providers. Examples of possible scripts are:
    • Requests header enrichment with custom parameters, like user id/name
    • Headers anonymisation like removal of Refer to improve user privacy
    • Request redirection from one site to another to avoid 302 messages
    • Response return, like a deny message for parental/employees' control
  • Scripts applying on server responses: These scripts allow intercepting and modifying responses provided by content providers. Examples of possible scripts are:
    • Content removal (ads/unwanted content)
    • Content adaptation based on user's device information provided in initial request
    • Scripts insertions to improve users' experience
    • Mashups