mozilla / node-janus Goto Github PK
View Code? Open in Web Editor NEWhttps://wiki.mozilla.org/Mobile/Janus
License: MIT License
https://wiki.mozilla.org/Mobile/Janus
License: MIT License
When Janus proxy is enabled, some chinese text fail to display properly.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1041947 for a more complete description.
When I enable the Janus proxy ang go to any URL, all I get is a PAC script. I thought it was because of in the handleContent function in proxy.js, but it seems the problem is in the handleRequest function: request.url
does not include a host and a protocol.
The quick, dirty fix for this is replacing line 156 with:
var parsedUrl = url.parse('http://' + request.headers.host + request.url);
Why is it so?
Content is partly loaded from cache and corresponds to the original content.
Content is partly loaded from cache with some text encoding broken.
The current caching key isn't adequate for most real-world scenarios, it needs to include following elements
accept-encoding
headers for xz supportExample of bandwidth savings:
http://littlesvr.ca/apng/gif_apng_webp5.html
GIF = 43 132 bytes
APNG = 30 823 bytes
Such lossless conversion is better for cartoonish non-video-like GIFs.
The proxy does not respond to WebSocket upgrade requests.
Verify with this test link.
As the title says only connections to https work on my school's WiFi. Whereas insecure connections using the proxy and the add-on work on my mobile data.
Is Janus going to be beheaded? Why?
Some JPG images are broken and doesn't appear in the latest Firefox when using Janus, e.g. http://mozliwosci.com/blog/wp-content/uploads/2012/08/tvp_estetyka_top.jpg
Response headers:
HTTP/1.1 200 OK
Date: Thu, 28 Jan 2016 16:52:56 GMT
Server: Apache
Last-Modified: Fri, 31 Aug 2012 16:57:48 GMT
Etag: "4dd6ab2-acf6-4c892b10c5b00"
Accept-Ranges: bytes
Content-Type: image/jpeg
Via: janus/0.7.0
x-original-content-length: 44278
X-Firefox-Spdy: 3.1
There is missing Content-Length
. Debug log does not show anything wrong, just:
info: [worker 8960] [INFO] Recompressing JPEG...
It happens only when using mozjpeg. libjpeg-turbo works fine.
Could you please add a test server in some EU country? The round-trip times from Poland to the USA and back take way too long right now (~300 ms).
Thanks!
Sometimes an awesomebar search just fails with Janus enabled. Nothing happens at all. This is on desktop nightly.
Seems to be cache related, as disabling that makes stuff work again.
The Janus addon breaks URLs like "http://fossology/". My /etc/hosts says, among other things:
127.0.0.1 fossology
However, with the proxy enabled, that URL doesn't work.
We need this to store things like bandwidth savings
The Lazy load plug-in relies on an additional data-original
attribute in img
to load images asynchronously.
Changing the img
tag to video
breaks that (even when preserving the data-original
attribute).
gif2video
While developing, we don't have the whole Graphite/StatsD infrastructure locally.
In order to test metrics output, we need a lightweight deployment option for StatsD and reasonable metrics output for debugging purposes.
Observed on several PHP-based forums, including vBulletin based and IPB based.
The comments section shows the comments.
The comments never load, only the loading animation is shown.
Tested with Firefox Nightly 2014-07-17.
Works with Google Chrome 35.
I am interested in running my own Janus instance but am worried about security. Does Janus support any authentication and authorization mechanisms?
FYI: The following changes were made to this repository's wiki:
defacing spam has been removed
Restricting write access to contributors is strongly encouraged. Please make that change (documentation).
These were made as the result of a recent automated defacement of publically writeable wikis.
After installing this addon, firefox on my pc crashed 32 times in a single day. And also my internet connection speed reduced to half. Then I disabled Janus and everything went back to normal. I tried it once more and the same problems appeared once again.
The proxy should
PUSH_PROMISE
framesPUSH_PROMISE
frames based onx-associated-content
headers$ npm install
...
> [email protected] install /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me
> CC=clang CXX=clang++ node-gyp configure build --verbose
npm http 304 https://registry.npmjs.org/asap
gyp info it worked if it ends with ok
gyp verb cli [ 'nodejs',
gyp verb cli '/usr/bin/node-gyp',
gyp verb cli 'configure',
gyp verb cli 'build',
gyp verb cli '--verbose' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command configure []
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `python -c "import platform; print(platform.python_version());"` returned: "2.7.6\n"
gyp verb get node dir no --target version specified, falling back to host node version: v0.10.25
gyp verb build dir attempting to create "build" dir: /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/build
gyp verb build dir "build" dir needed to be created? null
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/build/config.gypi
gyp verb config.gypi checking for gypi file: /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/config.gypi
gyp verb common.gypi checking for gypi file: /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python
gyp info spawn args [ '/usr/share/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/share/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/include/nodejs/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args '-Dmodule_root_dir=/home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /usr/include/nodejs
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/build'
clang++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/sockit/src/addon.o.d.raw -c -o Release/obj.target/sockit/src/addon.o ../src/addon.cc
clang: warning: optimization flag '-fno-tree-vrp' is not supported
In file included from ../src/addon.cc:5:
../src/sockit.h:17:29: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void New(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:17:49: error: expected ')'
static void New(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:17:18: note: to match this '('
static void New(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:19:33: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void Connect(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:19:53: error: expected ')'
static void Connect(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:19:22: note: to match this '('
static void Connect(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:21:30: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void Read(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:21:50: error: expected ')'
static void Read(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:21:19: note: to match this '('
static void Read(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:23:31: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void Write(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:23:51: error: expected ')'
static void Write(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:23:20: note: to match this '('
static void Write(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:27:31: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void Close(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:27:51: error: expected ')'
static void Close(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:27:20: note: to match this '('
static void Close(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:29:40: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void SetPollTimeout(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:29:60: error: expected ')'
static void SetPollTimeout(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:29:29: note: to match this '('
static void SetPollTimeout(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:30:37: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
static void SetDebugLog(const v8::FunctionCallbackInfo<v8::Value>&);
~~~~^
../src/sockit.h:30:57: error: expected ')'
static void SetDebugLog(const v8::FunctionCallbackInfo<v8::Value>&);
^
../src/sockit.h:30:26: note: to match this '('
static void SetDebugLog(const v8::FunctionCallbackInfo<v8::Value>&);
^
14 errors generated.
make: *** [Release/obj.target/sockit/src/addon.o] Error 1
make: Leaving directory `/home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-101-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build" "--verbose"
gyp ERR! cwd /home/gaul/work/node-janus/node_modules/marionette-client/node_modules/sockit-to-me
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
PDF is loaded and viewed.
PDF is only partially loaded (about 300 KB).
For people who just want to read an article or have used up their high-speed quota and are stuck on EDGE for the rest of the month.
As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:
If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].
(Message COC001)
Video controls aren't displayed with Janus enabled. Works fine otherwise.
Node-Janus does not build out of the box on Debian Jessie with default node.js v0.10.29 and node-gyp v3.2.1 installed by apt-get
.
First, it requires to change the version of marionette-client to 1.9.0 in packages.json
.
Next, it requires additional packages: libpng-dev, automake, autoconf, nasm, g++, libtool, gettext.
Finally, the libjpeg-turbo URL is invalid and raises Zlib error.
We need to separate the response handling chain into the quick response phase and the slow recoding and caching phase.
Load the resource from cache or the original source and forward it directly back to the client.
Decide whether the resource is cacheable. If not, terminate the chain. Otherwise, proceed with the compression plugins and cache the result.
Things to consider
With HTTP/2's finalization, we should migrate to a Node HTTP/2 module from the currently used SPDY module.
We should have performance tests in place before attempting this, to avoid unregistered regressions on that level.
Page loads correctly, no errors reported.
Page layout is mangled, images missing, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.