Skip to content

Commit a28dd92

Browse files
committed
Merge branch 'dev' into release-candidate
2 parents 5551548 + bfa487d commit a28dd92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+970
-539
lines changed

Gruntfile.coffee

Lines changed: 171 additions & 87 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ uProxy is built using the following tools:
1515
- [TypeScript](http://www.typescriptlang.org/) as the primary language we code in; this compiles to JavaScript. It gives us type-checking and has some syntax improvements on JS, while letting us incrementally migrate and easily include external JS packages and frameworks.
1616
- [Jasmine](http://pivotal.github.io/jasmine/) for testing
1717
- [Polymer](http://www.polymer-project.org/) for UI
18-
18+
1919
To manage dependencies we use:
2020
- [npm](https://www.npmjs.org/) for installing node modules that we use for our build process. (Specified in `package.json`)
2121
- [Bower](http://bower.io) to install libraries that we use in the UI
@@ -58,16 +58,13 @@ modify (`/usr/local`) to being editable by your user (sudo chown -R $USER /usr/l
5858
1. Clone uProxy and its submodules (and its submodules' submodules...): `git clone https://github.com/uProxy/uProxy.git` or `git clone git@github.com:uProxy/uproxy.git` if you have your ssh access to github set up (useful if you use 2-step auth for github, which you should do).
5959

6060
1. In the root uProxy directory, run:
61-
* `npm install` - this will install all node npm module development dependencies; you'll see lots of npm messages. (watch out for errors; sometimes npm module installation is broken, downloads fail etc). This will also install the static content dependencies (mostly Polymer components).
6261
* `./setup.sh install` - this will set up build tools and third-party dependencies.
6362
* `grunt` - this will build everything, including uProxy for Chrome and Firefox.
6463

65-
Note that if any local dependencies have changed (i.e. changes to bower dependencies, updates to FreeDOM), you will have to run `npm update` and/or `bower install` to update these dependencies, then rerun `grunt`
64+
Note that if any local dependencies have changed (i.e. changes to bower dependencies, updates to FreeDOM), you will have to run `./setup.sh install` to update these dependencies, then rerun `grunt`
6665

6766
### Installing and running
6867

69-
*Please don’t submit uProxy to the Chrome Web Store or Firefox Marketplace*. uProxy is under active development and the team takes its responsibility to provide security very seriously; we don’t want at-risk groups that may not be technically sophisticated — journalists, human-rights workers, et al — to rely on uProxy until we feel it’s ready. Prematurely making uProxy available could have very serious real world ramifications. Before we release uProxy to the browser stores, we want the source code examined and reviewed so that the community as a whole can help us make sure that we haven’t overlooked anything in our implementation. Once we feel that uProxy is ready, we will release it via the browser web stores ourselves.
70-
7168
#### Chrome
7269

7370
These are the steps to try uProxy in the Chrome browser.
@@ -94,54 +91,33 @@ Instructions can be found here: https://developer.mozilla.org/en-US/Add-ons/SDK/
9491

9592
You can use `grunt build_firefox` from the root directory of the repository to compile just Firefox comonents.
9693

97-
98-
#### Starting two instances of Chrome on the same machine
99-
100-
To test proxying without using multiple computers, you can launch two separate instances of Chrome (specifying different directories for user-data-dir). To launch a new instance of Chrome on Mac, run:
101-
```"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --user-data-dir=${DIR_NAME}/.chrome-beta-test-user```
102-
where DIR_NAME is set to the name of a directory where you want to store custom chrome profiles, e.g. `/tmp/`.
103-
104-
In each instance of Chrome, load the uProxy app and extension as describe above.
105-
106-
You can also test between one instance of Chrome and one instance in Firefox.
107-
108-
Then in each instance, within uProxy, sign into Google with gmail accounts that have already added each other as contacts. After sign-in both contacts should be visible on each other's roster. Once proxying is started in the UI, try visiting any web page from the client's Chrome window. To verify that traffic is actually being proxied, open the debug console for the server's uProxy Chrome App. You should see traces indicating the flow of traffic through the proxy.
109-
11094
### Development and re-building uProxy
11195

11296
uProxy uses the Grunt build system for its build tasks. Here is a list
11397
of uProxy's Grunt commands:
11498

11599
* `build` - Builds everything, making stuff in the `build` directory (and runs tests).
116100
* `build_chrome` - Build Chrome app and extension
117-
* `build_chrome_app` - Build just Chrome app
118-
* `build_chrome_extension` - Build just Chrome extension
101+
* `build_chrome_app` - Build just Chrome app
102+
* `build_chrome_ext` - Build just Chrome extension
119103
* `build_firefox` - Build just Firefox
120-
* `build_uistatic` - Build the static UI.
104+
* `dist` - Generates distribution files, including the Firefox xpi
121105
* `clean` - Cleans up
122-
* `watch` - Watch for changes and recompile as needed.
123106
* `test` - Run unit tests
124-
* `xpi` - Generates an .xpi for installation to Firefox.
125-
* `run_uistatic` - Run the standalone UI on a local webserver.
126107
* `everything` - 'test', then 'build'
127108

128109
The easiest way to stay current is to pull changes, run `grunt build` to build
129-
your distribution, then run `grunt watch`, which will rebuild as you make changes. (TODO: grunt watch is broken; fix it!)
110+
your distribution, and re-run as you make changes to the files.
130111

131112
Before submitting any changes to the repository, make sure to run `grunt test`
132-
to make sure it passes all unit tests. Failing tests are cause to immediately
113+
to make sure it passes all unit tests. Failing tests are enough to immediately
133114
reject submissions. :)
134115

135116

136117
### Fixing compilation and setup
137118

138-
The following hints may help you if it goes wrong and you need to debug and fix it.
139-
140-
- The file called `package.json` provides details of node packages used to build uProxy. To download and install them in the right place (typically a subdirectory called `node_packages`) run `npm install`.
141-
142-
- A file called `bower.json` provides details of packages for the UI, typically JavaScript for the browser. Run `bower install` to download and install the dependencies. They are typically installed in a directory called `lib` (as defined by a local file called `.bowerrc`).
143-
144-
- If bower fails, it doesn't tell you. Sometimes things don't work because it failed to install something that you need. When you run `bower install`, look out for error messages.
119+
- If something is going wrong during the build process, please try running `grunt
120+
clean`, `./setup.sh clean`, and re-running `./setup.sh install`
145121

146122
- If things are not working, check that you have recent versions of bower, npm, and node.
147123

@@ -155,24 +131,25 @@ Configuration and setup files
155131
* `.gitignore` what git should ignore
156132
* `.bowerrc` tells bower where to put files
157133
* `.travis.yml` Travis auto-testing
158-
* `tools` directory contains some typescript and javascript to help Grunt.
134+
* `tools` directory contains some typescript and javascript to help Grunt.
135+
* `third_party/tsd.json` specifies the typescript definitions to use
159136

160137
Source code
161138
* `src` holds all source code; no compiled files
162139
* `src/generic_ui` generic user interface code
163140
* `src/generic_core` generic uproxy core-functionality code
164-
* `src/chrome_app` code specific to the chrome app
165-
* `src/chrome_extension` code specific to the chrome extension
141+
* `src/chrome/app` code specific to the chrome app
142+
* `src/chrome/extension` code specific to the chrome extension
166143
* `src/firefox` code specific to firefox
167144
* `third_party` holds external libraries we depend on that are copied into this repository
168145
* `node_modules` dynamically generated npm module dependencies
169146
* `scraps` temporary holding for sharing scraps of code
170147

171148
Dynamically created directories (`grunt clean` should remove them)
172149
* `build` created by grunt tasks; holds the built code, but none of the code that was compiled.
173-
* `dist` created by grunt tasks; holds final distribution versions
174-
* `test_output` created by grunt tasks; holds test-output files
150+
* `build/dist` created by grunt tasks; holds final distribution versions
175151
* `.grunt` holds grunt cache stuff
152+
* `.tscache` holds typescript cache stuff
176153

177154
## Glossary of frameworks you need to know about
178155

bower.json

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
{
22
"name": "uProxy",
3-
"version": "0.4.0",
3+
"version": "0.8.6",
44
"dependencies": {
5-
"polymer": "^0.5.2",
6-
"paper-elements": "Polymer/paper-elements#~0.5.1",
7-
"core-input": "Polymer/core-input#^0.5.0",
8-
"core-style": "Polymer/core-style#^0.5.0",
9-
"core-icons": "Polymer/core-icons#~0.5.1",
10-
"core-signals": "Polymer/core-signals#~0.5.5",
11-
"paper-dialog": "Polymer/paper-dialog#~0.5.5",
12-
"core-label": "Polymer/core-label#~0.5.5",
13-
"core-tooltip": "Polymer/core-tooltip#~0.5.5",
14-
"core-collapse": "Polymer/core-collapse#~0.5.5",
15-
"core-header-panel": "Polymer/core-header-panel#~0.5.5",
16-
"core-drawer-panel": "Polymer/core-drawer-panel#~0.5.5",
17-
"core-overlay": "Polymer/core-overlay#~0.5.5",
18-
"paper-toast": "Polymer/paper-toast#~0.5.5"
5+
"polymer": "^0.5.6",
6+
"paper-elements": "Polymer/paper-elements#^0.5.6",
7+
"core-input": "Polymer/core-input#^0.5.6",
8+
"core-style": "Polymer/core-style#^0.5.6",
9+
"core-icons": "Polymer/core-icons#^0.5.6",
10+
"core-signals": "Polymer/core-signals#^0.5.6",
11+
"paper-dialog": "Polymer/paper-dialog#^0.5.6",
12+
"core-label": "Polymer/core-label#^0.5.6",
13+
"core-tooltip": "Polymer/core-tooltip#^0.5.6",
14+
"core-collapse": "Polymer/core-collapse#^0.5.6",
15+
"core-header-panel": "Polymer/core-header-panel#^0.5.6",
16+
"core-drawer-panel": "Polymer/core-drawer-panel#^0.5.6",
17+
"core-overlay": "Polymer/core-overlay#^0.5.6",
18+
"paper-toast": "Polymer/paper-toast#^0.5.6"
19+
},
20+
"resolutions": {
21+
"webcomponentsjs": "^0.6.1"
1922
}
2023
}

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "uProxy",
33
"description": "Share your pathway to the Internet",
4-
"version": "0.8.5",
4+
"version": "0.8.6",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/uproxy/uproxy"
@@ -19,7 +19,10 @@
1919
"devDependencies": {
2020
"arraybuffer-slice": "^0.1.2",
2121
"bower": "^1.4.1",
22+
"circular-json": "^0.1.6",
23+
"crypto": "^0.0.3",
2224
"es6-promise": "^2.0.0",
25+
"freedomjs-anonymized-metrics": "~0.1.0",
2326
"freedom-for-chrome": "^0.4.11",
2427
"freedom-for-firefox": "0.6.10",
2528
"freedom-social-firebase": "^0.0.12",
@@ -42,8 +45,7 @@
4245
"lodash": "^3.7.0",
4346
"regex2dfa": "^0.1.6",
4447
"tsd": "^0.5.7",
45-
"uproxy-lib": "^25.0.0",
46-
"uproxy-networking": "^10.0.0",
48+
"uproxy-lib": "^26.0.0",
4749
"utransformers": "^0.2.1"
4850
},
4951
"peerDependencies": {

src/chrome/app/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "__MSG_appName__",
44
"description": "__MSG_appDescription__",
55
"minimum_chrome_version": "41.0.2272.63",
6-
"version": "0.8.5",
6+
"version": "0.8.6",
77
"default_locale": "en",
88
"icons": {
99
"128": "icons/128_online.png"

src/chrome/app/scripts/main.core-env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export var moduleName = 'uProxy App Top Level';
2727
freedom('generic_core/freedom-module.json', {
2828
'logger': 'uproxy-lib/loggingprovider/freedom-module.json',
2929
'debug': 'debug',
30-
'portType': 'frame',
30+
'portType': 'worker',
3131
'oauth': [() => { return new Chrome_oauth(oauthOptions); }]
3232
}).then((uProxyModuleFactory:OnEmitModuleFactory) => {
3333
uProxyAppChannel = uProxyModuleFactory();

src/chrome/extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "__MSG_extName__",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"manifest_version": 2,
55
"description": "__MSG_extDescription__",
66
"minimum_chrome_version": "41.0.2272.63",

src/chrome/extension/scripts/background.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ chrome.runtime.onMessage.addListener((request :any, sender: chrome.runtime.Messa
4141
chromeBrowserApi.bringUproxyToFront();
4242
}
4343

44-
// handle requests to stop proxying
45-
if (request && request.stopProxying) {
46-
ui.stopGettingInUiAndConfig(false);
47-
}
48-
4944
// handle requests to get logs
5045
if (request && request.getLogs) {
5146
core.getLogs().then((logs) => {
@@ -131,7 +126,7 @@ function initUI() : user_interface.UserInterface {
131126
lastUrlTime = Date.now();
132127

133128
return {
134-
redirectUrl: chrome.extension.getURL('copypaste.html')
129+
redirectUrl: chrome.extension.getURL('generic_ui/copypaste.html')
135130
};
136131
},
137132
{ urls: ['https://www.uproxy.org/request/*', 'https://www.uproxy.org/offer/*'] },

src/chrome/extension/scripts/chrome_browser_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import browser_api = require('../../../interfaces/browser_api');
88
import BrowserAPI = browser_api.BrowserAPI;
9-
import net = require('../../../../../third_party/uproxy-networking/net/net.types');
9+
import net = require('../../../../../third_party/uproxy-lib/net/net.types');
1010
import UI = require('../../../generic_ui/scripts/ui');
1111

1212
/// <reference path='../../../../third_party/typings/chrome/chrome.d.ts'/>

src/chrome/extension/scripts/disconnected.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)