commit 3f85bb0ed83ec34505be1b0fca5b3f8307d9dec4 Author: David Fifield david@bamsoftware.com Date: Sun Oct 13 19:02:44 2013 -0700
Move the modules directory into the proxy directory.
Taken from https://github.com/infinity0/flashproxy/commit/4819df2aa1f45eec0fd5e676abcb0..., except moved to proxy/modules rather than proxy-modules, as was originally suggested at https://trac.torproject.org/projects/tor/ticket/9668. --- .gitignore | 4 ++-- modules/README | 8 -------- modules/drupal/flashproxy-start.js | 1 - modules/drupal/flashproxy.info | 5 ----- modules/drupal/flashproxy.js | 1 - modules/drupal/flashproxy.module | 2 -- modules/facebook/facebook.html | 17 ----------------- modules/mediawiki/custom.js | 9 --------- modules/nodejs/Makefile | 4 ---- modules/nodejs/README | 28 ---------------------------- modules/nodejs/main.js | 30 ------------------------------ modules/nodejs/package.json | 30 ------------------------------ proxy/modules/README | 8 ++++++++ proxy/modules/drupal/flashproxy-start.js | 1 + proxy/modules/drupal/flashproxy.info | 5 +++++ proxy/modules/drupal/flashproxy.js | 1 + proxy/modules/drupal/flashproxy.module | 2 ++ proxy/modules/facebook/facebook.html | 17 +++++++++++++++++ proxy/modules/mediawiki/custom.js | 9 +++++++++ proxy/modules/nodejs/Makefile | 4 ++++ proxy/modules/nodejs/README | 28 ++++++++++++++++++++++++++++ proxy/modules/nodejs/main.js | 30 ++++++++++++++++++++++++++++++ proxy/modules/nodejs/package.json | 30 ++++++++++++++++++++++++++++++ 23 files changed, 137 insertions(+), 137 deletions(-)
diff --git a/.gitignore b/.gitignore index c3e5b7f..0e9120d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.pyc /dist /py2exe-tmp -/modules/nodejs/node_modules -/modules/nodejs/flashproxy.js +/proxy/modules/nodejs/node_modules +/proxy/modules/nodejs/flashproxy.js diff --git a/modules/README b/modules/README deleted file mode 100644 index 520a47b..0000000 --- a/modules/README +++ /dev/null @@ -1,8 +0,0 @@ -This directory contains modules and plugins for making flash proxies -work with other systems such as web publishing platforms. - -See a collection of modules for other platforms at -https://github.com/glamrock/cupcake. - -For a plugin for Mozilla Firefox, see -https://addons.mozilla.org/en-us/firefox/addon/tor-flashproxy-badge/. diff --git a/modules/drupal/flashproxy-start.js b/modules/drupal/flashproxy-start.js deleted file mode 100644 index fe7d10b..0000000 --- a/modules/drupal/flashproxy-start.js +++ /dev/null @@ -1 +0,0 @@ -flashproxy_badge_insert().start(); diff --git a/modules/drupal/flashproxy.info b/modules/drupal/flashproxy.info deleted file mode 100644 index 2f9b174..0000000 --- a/modules/drupal/flashproxy.info +++ /dev/null @@ -1,5 +0,0 @@ -name = Flashproxy Module -description = Insert Flashproxy js into some or all pages on your site. -core = 7.x -scripts[] = flashproxy.js -scripts[] = flashproxy-start.js diff --git a/modules/drupal/flashproxy.js b/modules/drupal/flashproxy.js deleted file mode 120000 index 710e470..0000000 --- a/modules/drupal/flashproxy.js +++ /dev/null @@ -1 +0,0 @@ -../../proxy/flashproxy.js \ No newline at end of file diff --git a/modules/drupal/flashproxy.module b/modules/drupal/flashproxy.module deleted file mode 100644 index a4abe2d..0000000 --- a/modules/drupal/flashproxy.module +++ /dev/null @@ -1,2 +0,0 @@ -<?php - diff --git a/modules/facebook/facebook.html b/modules/facebook/facebook.html deleted file mode 100644 index 8321dbc..0000000 --- a/modules/facebook/facebook.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="utf-8"> -<title>flash proxy facebook app demo</title> -<style type="text/css"> -iframe { - display: block; - padding: 5%; - border: none; -} -</style> -</head> -<body> -<iframe src="//crypto.stanford.edu/flashproxy/embed.html" width="80" height="15" frameborder="0" scrolling="no"></iframe> -</body> -</html> diff --git a/modules/mediawiki/custom.js b/modules/mediawiki/custom.js deleted file mode 100644 index 4b882c6..0000000 --- a/modules/mediawiki/custom.js +++ /dev/null @@ -1,9 +0,0 @@ -/* Flash proxy badge for MediaWiki. By Sathyanarayanan Gunasekaran. - Requires $wgAllowUserJs to be true in the MediaWiki configuration. - https://www.mediawiki.org/wiki/Manual:Interface/JavaScript - This affects only your own user. Works on Wikipedia. - - Go to Preferences → Appearance → Custom JavaScript. - You will end up editing common.js; paste in this code and save it. */ - -$('#p-personal ul').append('<li><iframe src="//crypto.stanford.edu/flashproxy/embed.html" width="80" height="15" frameborder="0" scrolling="no"></iframe></li>'); diff --git a/modules/nodejs/Makefile b/modules/nodejs/Makefile deleted file mode 100644 index e4a11d4..0000000 --- a/modules/nodejs/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: prepublish -prepublish: flashproxy.js -flashproxy.js: ../../proxy/flashproxy.js - cp -f $< $@ diff --git a/modules/nodejs/README b/modules/nodejs/README deleted file mode 100644 index 57d0ddf..0000000 --- a/modules/nodejs/README +++ /dev/null @@ -1,28 +0,0 @@ -== Headless flash proxies with node.js - -Traditionally, flash proxies have run in the browser. However, it may be -desirable to run them as background daemons. This directory contains a main.js -file which wraps the regular flashproxy.js and runs headlessly from node.js. - -To install the requirements (in Ubuntu universe), - - > apt-get install git nodejs npm - -Then, if you've checked out the flashproxy source from git, - - > git clone https://git.torproject.org/flashproxy.git - > cd flashproxy/modules/nodejs - > npm install - > npm start # or, node main.js - -This package is also being published on the npm registry. To add a `flashproxy` -bin to your path without checking out from git, at any time run, - - > npm install -g flashproxy - > flashproxy - -Rather than install globally, you can also, - - > cd ~/ # or, to the dir of your choice - > npm install flashproxy - > npm start flashproxy # or, node node_modules/flashproxy diff --git a/modules/nodejs/main.js b/modules/nodejs/main.js deleted file mode 100755 index 64e50b9..0000000 --- a/modules/nodejs/main.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -var path = require("path"); -var fs = require("fs"); - -// Get a querystring from the command line -var location_search = "debug=1&initial_facilitator_poll_interval=10"; -if (process.argv[2] != null) - location_search = process.argv[2]; - -// Setup environment variables for node.js -var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; -var window = { - location: { search: "?" + location_search }, - navigator: { userAgent: "Chrome/16" }, - WebSocket: require("ws") -}; - -// Include flashproxy.js using eval to avoid modifying it. -var file = path.join(__dirname, "flashproxy.js"); -try { - var data = fs.readFileSync(file, "utf8"); -} catch (e) { - console.log("Can't locate the flashproxy.js file. You probably need to run "npm install"."); - process.exit(1); -} -eval(data); - -// Start 'er up -flashproxy_badge_new().start(); diff --git a/modules/nodejs/package.json b/modules/nodejs/package.json deleted file mode 100644 index 1de1157..0000000 --- a/modules/nodejs/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "flashproxy", - "version": "0.1.0", - "description": "Standalone flash proxy. A flash proxy is a lightweight proxy providing access to the Tor network.", - "main": "main.js", - "scripts": { - "prepublish": "make prepublish", - "start": "node main.js" - }, - "bin": { - "flashproxy": "main.js" - }, - "dependencies": { - "xmlhttprequest": "1.5.0", - "ws": "0.4.27" - }, - "repository": { - "type": "git", - "url": "https://git.torproject.org/flashproxy.git" - }, - "keywords": [ - "flashproxy", - "tor", - "bridge", - "relay", - "websocket", - "pluggable transport" - ], - "license": "MIT" -} diff --git a/proxy/modules/README b/proxy/modules/README new file mode 100644 index 0000000..520a47b --- /dev/null +++ b/proxy/modules/README @@ -0,0 +1,8 @@ +This directory contains modules and plugins for making flash proxies +work with other systems such as web publishing platforms. + +See a collection of modules for other platforms at +https://github.com/glamrock/cupcake. + +For a plugin for Mozilla Firefox, see +https://addons.mozilla.org/en-us/firefox/addon/tor-flashproxy-badge/. diff --git a/proxy/modules/drupal/flashproxy-start.js b/proxy/modules/drupal/flashproxy-start.js new file mode 100644 index 0000000..fe7d10b --- /dev/null +++ b/proxy/modules/drupal/flashproxy-start.js @@ -0,0 +1 @@ +flashproxy_badge_insert().start(); diff --git a/proxy/modules/drupal/flashproxy.info b/proxy/modules/drupal/flashproxy.info new file mode 100644 index 0000000..2f9b174 --- /dev/null +++ b/proxy/modules/drupal/flashproxy.info @@ -0,0 +1,5 @@ +name = Flashproxy Module +description = Insert Flashproxy js into some or all pages on your site. +core = 7.x +scripts[] = flashproxy.js +scripts[] = flashproxy-start.js diff --git a/proxy/modules/drupal/flashproxy.js b/proxy/modules/drupal/flashproxy.js new file mode 120000 index 0000000..710e470 --- /dev/null +++ b/proxy/modules/drupal/flashproxy.js @@ -0,0 +1 @@ +../../proxy/flashproxy.js \ No newline at end of file diff --git a/proxy/modules/drupal/flashproxy.module b/proxy/modules/drupal/flashproxy.module new file mode 100644 index 0000000..a4abe2d --- /dev/null +++ b/proxy/modules/drupal/flashproxy.module @@ -0,0 +1,2 @@ +<?php + diff --git a/proxy/modules/facebook/facebook.html b/proxy/modules/facebook/facebook.html new file mode 100644 index 0000000..8321dbc --- /dev/null +++ b/proxy/modules/facebook/facebook.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>flash proxy facebook app demo</title> +<style type="text/css"> +iframe { + display: block; + padding: 5%; + border: none; +} +</style> +</head> +<body> +<iframe src="//crypto.stanford.edu/flashproxy/embed.html" width="80" height="15" frameborder="0" scrolling="no"></iframe> +</body> +</html> diff --git a/proxy/modules/mediawiki/custom.js b/proxy/modules/mediawiki/custom.js new file mode 100644 index 0000000..4b882c6 --- /dev/null +++ b/proxy/modules/mediawiki/custom.js @@ -0,0 +1,9 @@ +/* Flash proxy badge for MediaWiki. By Sathyanarayanan Gunasekaran. + Requires $wgAllowUserJs to be true in the MediaWiki configuration. + https://www.mediawiki.org/wiki/Manual:Interface/JavaScript + This affects only your own user. Works on Wikipedia. + + Go to Preferences → Appearance → Custom JavaScript. + You will end up editing common.js; paste in this code and save it. */ + +$('#p-personal ul').append('<li><iframe src="//crypto.stanford.edu/flashproxy/embed.html" width="80" height="15" frameborder="0" scrolling="no"></iframe></li>'); diff --git a/proxy/modules/nodejs/Makefile b/proxy/modules/nodejs/Makefile new file mode 100644 index 0000000..e4a11d4 --- /dev/null +++ b/proxy/modules/nodejs/Makefile @@ -0,0 +1,4 @@ +.PHONY: prepublish +prepublish: flashproxy.js +flashproxy.js: ../../proxy/flashproxy.js + cp -f $< $@ diff --git a/proxy/modules/nodejs/README b/proxy/modules/nodejs/README new file mode 100644 index 0000000..57d0ddf --- /dev/null +++ b/proxy/modules/nodejs/README @@ -0,0 +1,28 @@ +== Headless flash proxies with node.js + +Traditionally, flash proxies have run in the browser. However, it may be +desirable to run them as background daemons. This directory contains a main.js +file which wraps the regular flashproxy.js and runs headlessly from node.js. + +To install the requirements (in Ubuntu universe), + + > apt-get install git nodejs npm + +Then, if you've checked out the flashproxy source from git, + + > git clone https://git.torproject.org/flashproxy.git + > cd flashproxy/modules/nodejs + > npm install + > npm start # or, node main.js + +This package is also being published on the npm registry. To add a `flashproxy` +bin to your path without checking out from git, at any time run, + + > npm install -g flashproxy + > flashproxy + +Rather than install globally, you can also, + + > cd ~/ # or, to the dir of your choice + > npm install flashproxy + > npm start flashproxy # or, node node_modules/flashproxy diff --git a/proxy/modules/nodejs/main.js b/proxy/modules/nodejs/main.js new file mode 100755 index 0000000..64e50b9 --- /dev/null +++ b/proxy/modules/nodejs/main.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +var path = require("path"); +var fs = require("fs"); + +// Get a querystring from the command line +var location_search = "debug=1&initial_facilitator_poll_interval=10"; +if (process.argv[2] != null) + location_search = process.argv[2]; + +// Setup environment variables for node.js +var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; +var window = { + location: { search: "?" + location_search }, + navigator: { userAgent: "Chrome/16" }, + WebSocket: require("ws") +}; + +// Include flashproxy.js using eval to avoid modifying it. +var file = path.join(__dirname, "flashproxy.js"); +try { + var data = fs.readFileSync(file, "utf8"); +} catch (e) { + console.log("Can't locate the flashproxy.js file. You probably need to run "npm install"."); + process.exit(1); +} +eval(data); + +// Start 'er up +flashproxy_badge_new().start(); diff --git a/proxy/modules/nodejs/package.json b/proxy/modules/nodejs/package.json new file mode 100644 index 0000000..1de1157 --- /dev/null +++ b/proxy/modules/nodejs/package.json @@ -0,0 +1,30 @@ +{ + "name": "flashproxy", + "version": "0.1.0", + "description": "Standalone flash proxy. A flash proxy is a lightweight proxy providing access to the Tor network.", + "main": "main.js", + "scripts": { + "prepublish": "make prepublish", + "start": "node main.js" + }, + "bin": { + "flashproxy": "main.js" + }, + "dependencies": { + "xmlhttprequest": "1.5.0", + "ws": "0.4.27" + }, + "repository": { + "type": "git", + "url": "https://git.torproject.org/flashproxy.git" + }, + "keywords": [ + "flashproxy", + "tor", + "bridge", + "relay", + "websocket", + "pluggable transport" + ], + "license": "MIT" +}
tor-commits@lists.torproject.org