Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial XULRunner Support #5

Merged
merged 23 commits into from
Nov 23, 2014
Merged

Conversation

JeremyRand
Copy link
Member

make now generates a XULRunner application as well as a Firefox extension. The XULRunner application works for me, although it has a few bugs and is definitely not ready for production use.

BETA TESTERS: The main feature that we need tested is HTTPS .bit websites with the standalone proxy. Two known sites are https://dot-bit.bit/ and https://www.freespeechme.bit/ . Please let us know if these work once the TLS installation script has been executed. (Windows, Ubuntu, and Fedora are the operating systems that hopefully work.) Also, report any bugs introduced in this PR.

@JeremyRand
Copy link
Member Author

@phelixbtc and @domob1812 , any objections to merging this?

@JeremyRand
Copy link
Member Author

Suggested Tip4Commit awards:

Update Readme: 0.1%
Add notes on building: 0.1%
Fix typo in options.js: 0.5%
Initial XULRunner support: 2%
Merge branch: 0%
Merge branch: 0%
Increased max XULRunner version: 1%

@domob1812
Copy link

While I can't really give you code review, I think it is fine for you to merge to Convergence according to your own judgement. At least, you get an ACK from me if phelix isn't opposed to it.

@JeremyRand
Copy link
Member Author

@phelixbtc Are you able to build and/or test this?

@phelixbtc
Copy link

I'll give it a try, might take a couple of days, though.

@JeremyRand
Copy link
Member Author

Thanks.

@JeremyRand
Copy link
Member Author

@phelixbtc , installation instructions are now in the readme. Can you see if you can run it on Windows?

@JeremyRand
Copy link
Member Author

@phelixbtc Have you had any luck testing?

@JeremyRand
Copy link
Member Author

When testing, you'll need to use XULRunner 30 (31 isn't tested yet, so it's disabled in the package metadata).

@crocket
Copy link

crocket commented Aug 5, 2014

I'm on ubuntu 14.04 64bit. When I executed the standalone on xulrunner 30.0, I saw

convergence

When I clicked option, I saw an error message as below.

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Cannot call openModalWindow on a hidden window"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource://gre/components/nsPrompter.js :: openModalWindow :: line 382"  data: no]
************************************************************

Although it works as an HTTP proxy, I really need it to work as a SOCKS proxy that passes requests to its parent proxy(e.g., Tor).

@JeremyRand
Copy link
Member Author

@crocket Thanks for testing. I will check on this. I've never seen that error; maybe I'll be able to hunt it down. Cheers.

@JeremyRand
Copy link
Member Author

@crocket , I get that behavior when I run xulrunner from the "client-standalone-files" directory; it should be run from the "client-standalone-build" directory, which is created by running "make" from the "client" directory. Can you check which directory you ran it from?

Thanks.

@JeremyRand
Copy link
Member Author

@crocket , I just pushed some changes. Now XULRunner 31 should work, and I improved the TLS install scripts... the Ubuntu one might work for you. Any chance you could test this?

@JeremyRand
Copy link
Member Author

@phelixbtc , the XULRunner version now appears to work with TLS on Internet Explorer on Windows. I've pushed a script that sets up the certificate... if you're able to test when you have a few minutes, that would be awesome.

@crocket
Copy link

crocket commented Aug 15, 2014

I tested this pull request against xulrunner 31 on Ubuntu 14.04.1 LTS 64bit. I built FreeSpeechMe and ran it as a standalone application.

After setting HTTP proxy to localhost:18833 and enabling remote DNS in Firefox 31, I couldn't browse .bit websites because Firefox routes DNS queries only via SOCKS proxy with remote DNS enabled.

To route DNS queries via FreeSpeechMe standalone, it needs to act as a SOCKS proxy.

@JeremyRand
Copy link
Member Author

@crocket , I'm not sure exactly what you mean. To my knowledge, Firefox always passes DNS to HTTP/HTTPS proxies; the remote DNS setting is only necessary for SOCKS proxies. Can you explain?

(And yes, SOCKS server support is certainly planned. Probably won't be too hard either. But I'd like to get this code merged first.)

Cheers.

@crocket
Copy link

crocket commented Aug 17, 2014

@JeremyRand I unchecked "remote DNS", but I can't visit .bit websites on chrome and firefox with localhost:18833 as HTTP proxy.

@JeremyRand
Copy link
Member Author

@crocket What errors do you get (in Firefox, Chrome, and the command line window running FreeSpeechMe-Standalone), if any? Do .com websites load okay while going through the FreeSpeechMe-Standalone proxy?

@crocket
Copy link

crocket commented Aug 17, 2014

While browsers are going through the standalone proxy, they can visit .com websites.
When I visit .com websites, the standalone logs access.
When I visit .bit websites, the standalone prints nothing, but browsers say there is no such domain.

@JeremyRand
Copy link
Member Author

@crocket Can you go to the settings dialog in FreeSpeechMe-Standalone, click OK without changing anything, and then try again? I think occasionally stuff breaks if you haven't done that... still need to properly investigate that.

Also, just to verify, you have NMControl running on the default port? If you type "./nmcontrol.py dns getIp4 www.freespeechme.bit" from the directory where NMControl is, what does NMControl say? That might tell us if this is a FreeSpeechMe issue or an NMControl issue.

@crocket
Copy link

crocket commented Aug 17, 2014

When I execute namecoind name_show dot-bit.bit, the console says error: {"code":-4,"message":"failed to read from name DB"}

However, namecoind getblockcount prints the latest blockchain.

I need to dig deeper into namecoind.

@JeremyRand
Copy link
Member Author

@crocket I think that's normal for namecoind; namecoind would expect "namecoind name_show d/dot-bit", since the .bit parsing is handled by NMControl, not namecoind.

@crocket
Copy link

crocket commented Aug 17, 2014

nmcontrol dns getIp4 dot-bit.bit and nmcontrol dns getIp4 freespeechme.bit print []
Howeer, nmcontrol dns getOnion federalistpapers.bit prints ["duskgytldkxiuqc6.onion"]

@JeremyRand
Copy link
Member Author

@crocket Well, that's why FreeSpeechMe-Standalone isn't able to resolve the domains... I guess the problem is in NMControl. I'm not sure what exactly would cause NMControl to work properly for getOnion but not getIp4... are you running NMControl with default settings?

@crocket
Copy link

crocket commented Aug 17, 2014

Somehow, nmcontrol started resolving dot-bit.bit, but it still can't resolve freespeechme.bit.

HTTP+HTTPS proxies work for chrome and firefox.
Unfortunately, since firefox doesn't support HTTPS proxy, I couldn't visit https://dot-bit.bit on firefox.

In other words, it works on my machine. Congratulations.

@JeremyRand
Copy link
Member Author

@crocket Excellent. So to verify, are you saying that dot-bit.bit works with both HTTP and HTTPS on Chrome, but only with HTTP on Firefox (HTTPS doesn't work for dot-bit.bit on Firefox)? If that's correct, what error does Firefox show, if any?

Thanks.

@crocket
Copy link

crocket commented Aug 17, 2014

@JeremyRand Oh, I thought http://dot-bit.bit didn't exist. I could visit http://dot-bit.bit on firefox.
But, firefox has no concept of HTTPS proxy, so I can't visit https://dot-bit.bit on firefox.

@JeremyRand
Copy link
Member Author

@crocket I think Firefox calls it an "SSL proxy" rather than "HTTPS proxy". To make sure I understand your previous comment, does dot-bit.bit load with both HTTP and HTTPS on Chrome?

@crocket
Copy link

crocket commented Aug 17, 2014

On both chrome and firefox, I can visit http://dot-bit.bit, but I can't visit https://dot-bit.bit because they fail to validate SSL certificate.

Firefox says "Error code: sec_error_bad_signature", and chrome keeps saying "The site's security certificate is not trusted!".

Other than SSL validation errors, .bit domain resolution works.

@JeremyRand
Copy link
Member Author

@crocket Have you run the TLS installation script from a terminal? If you're on Ubuntu, it's "install_tls_ubuntu.sh". Make sure you run it while Firefox, Chrome, and FreeSpeechMe-Standalone are closed.

@JeremyRand JeremyRand mentioned this pull request Aug 26, 2014
@JeremyRand
Copy link
Member Author

@crocket Can you confirm whether TLS validation works on Ubuntu after running the TLS installation script, as per my previous message?

@crocket
Copy link

crocket commented Oct 26, 2014

Right now, I'm busy, so I allocated a time slot on November 1st for the test.

@crocket
Copy link

crocket commented Nov 1, 2014

@JeremyRand I'm sorry for not being able to help you for a while. I thought I could get some time, but I'm too busy extinguishing troubles arising from my day job. I won't have time for the next 3 months. I think you better test it yourself.

@JeremyRand
Copy link
Member Author

@crocket No worries, thanks for trying.

@JeremyRand
Copy link
Member Author

Since everyone agrees that this PR doesn't adversely affect the Firefox extension, and the standalone version seems to work for some people, I will be merging this if no NACKs are received within 72 hours. Any issues with the standalone version can be fixed by subsequent PR's.

@JeremyRand
Copy link
Member Author

Merging.

JeremyRand added a commit that referenced this pull request Nov 23, 2014
@JeremyRand JeremyRand merged commit 8c1ed62 into namecoin:namecoin Nov 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants