I am developing web-app on mobile which is using user camera & microphone.
When I want to run it on mobile in same network. I am running server on --host 0.0.0.0 to be able to run it on mobile.
The problem is that my dev server is running on http protocol, and mobile browser is not allowing getUserMedia in that case.
What is good solution to solve it?
I know I can set flags on my mobile browser to allow insecure connection, but it is also my private phone, so I don't want to go this path.
You wrote
dev server is running on http protocol, and mobile browser is not allowing getUserMedia in that case.
You Can't Do Thatâ„¢. You must use https to serve your web pages and Javascript for this kind of application, or all browsers deny access to getUserMedia() and other similar browser-resident APIs.
True for desktop and mobile browsers.
Because cybercreeps.
Related
I have a dev server running in an Angular 5 cli-project at localhost:4200 through webpack-dev-server.
I want to connect my iphone to the dev server for testing. It uses the same wifi SSID as my computer.
I'm using the computer's registered name in safari's url field in the iphone:
jonathans-macbook-pro.local:4200
It doesn't work and after waiting it says
Safari could not open the page because the server stopped responding
I also have the coda app that also serves a project at
jonathans-macbook-pro.local:62035
and I'm able to access it just fine on the Safari browser. Although this is because I believe I can allow the coda app to accept incoming connections:
Although I'm not sure how to get more technical other than adding an application through the GUI. I've tried to using editing the PF rules at /etc/pf.conf
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
pass in proto tcp from any to any port 80
pass in proto tcp from any to any port 4200
and then did:
sudo pfctl -f /etc/pf.conf
to reload it. Although the iphone still can't connect to the localhost:4200 dev server.
I also had hopped that allowing node to accept incoming connections (via a popup) would allow the iphone to get through the firewall, although it still doesn't work.
Anyone have any idea what could be preventing my iPhone from connecting to the dev-server on my mac?
I want to use Charles Proxy to share a local development PC's web server where I am developing sites on so that I can access the PC over my LAN to test on various mobile devices.
Having setup the correct ip address of my PC in the http proxy settings on various tablets they can all connect to the PC and this works fine.
The issue is that I need to test a wordpress site and as anyone that uses wordpress knows, it generates full url links between each page it serves. As the site normally runs on my PC the urls it generates are all http://localhost/wordpress/pagename.
So the issue is that if I access the same site from a remote device via the proxy (addressing http://192.168.1.200/wordpress/) it instantly redirects me to http://localhost/wordpress/pagename url in the mobile device and this fails to load as the tablet can't determine "localhost" correctly.
There must be a way of using one of Charles' various options to resolve this but I can't for the life of me work out which. I've tried remote maps and DNS spoofing but no joy.
Note, I'm completely aware that you can with SQL commands change the urls throughout a wordpress database but I just wanted to see if this was possible without undertaking this step as it would be a lot more flexible if I don't have to do that each time I want to preview sites via my other local LAN devics.
You can use Charles proxy feature called Rewrite Tool. I assume your local network uses 192.168.168.X IPs.
Enable rewrite
Add new rule and name it as you wish
To Locations section add Protocol: http and Host: 192.168.168.X
To Rules section add Type: body, Where: response, Match: localhost, Replace: 192.168.168.X
It may require some more tinkering but i hope you get the idea
I've developed an Android app relying on a REST server. The app works great on mobile network and also on my WiFi.
But when I try it at the university, it cannot connect to the server. The connection is an https on the standards ports (which aren't blocked). If I try to load the server URL in chrome it can reach the server.
I don't think it's a code related issue because some other android apps don't work here either. I think it's a firewall rule but what?
When I curl the the address of the server (the same as the android app), it returns correctly. Is it an user-agent filter or something like that ?
I don't know if it can be the cause but I self-signed my ssl certificate. Can it be related ?
What can cause this issue ? Is it a solution on my side ?
we have a site (https://oursite.net) in which we display a videostream hosted on http (http://someserver.com). The site needs to be hosted on https, and we don't control the video, so I'm assuming it needs to be on http. we recently added the option to play the stream through the silverlight asp:MediaElement, which works perfectly fine in our test environment (on http) but doesn't work in production (https).
The info on the web is somewhat confusing as I'm having a hard time differentiating between how this stuff worked at different stages in the silverlight development (seems to have been a bit to and fro)
Is this setup possible at all (hosting the player on https but playing a stream on http) with some sort of policy file?
in that case: does this policy file need to be hosted with the silverlight app (on https) or where the streams are located (http)
Thanks for your time
Andreas
You are running into a cross-scheme violation unfortunately. The stream would need to match the same scheme (https) as the hosting application. Unfortunately most streaming isn't available in HTTPS.
Can you check the enableHtmlAccess property on the object tag to make sure it is true? Most media players end up using the HTML DOM bridge to communicate with the web page.
It's also likely that there is a cross-scheme issue: you should try and optimize for all assets being on the same scheme (HTTP or HTTPS).
In my project I need to connect to an intra-net web service but we need SSL connection between the two machines.
Because this is an intra-net site the certificate of the web service might be a self-signed certificate.
The web service and the web page that loads my Flex application resides on the same web server (tomcat) so when I load the web page of the application with HTTPS I been asked to confirm the certificate, I confirm it but this confirmation does not apply on the Flex application (on Internet Explorer and Firefox).
I tried Google's Chrome and it actually asked me twice for confirmation, one for the web page and one for the connection to the web service so it worked great.
Is there a way to tell Flash player to accept also self-signed certificates of is it entirely concern the browser and Adobe guys can't do nothing about it?
In other words, is there a way to connect to a self-signed certificates HTTPS web services from Adobe Flex???
Thanks.
When I put on my security hat the answer would be I hope not. I don't want browser plugins to bypass my browser security settings. I'd consider that a vulnerability.
There might be a way for standalone Air applications, but in browser Flash should honor browser settings.
In your company, you could create your own root CA, add its certificate to all machines that will access the intranet, and then have the CA issue your web service a certificate. The certificate will no longer be self-signed. The two main issues are: (1) managing the private key of your CA, (2) distributing the CA's root certificate to client PCs.
You need to download the cert and install it on both IE and Firefox.
To install a cert on IE:
http://www.markwilson.co.uk/blog/2008/11/trusting-a-self-signed-certificate-in-windows.htm
To install a cert on FF:
Go to Tools->Options and click on the Encryption tab. Click "View Certificates", then "Import".
In my experience, the cert has to be either verified or installed in the browser in order to get Flash to work properly. The cert also needs to have a valid hostname, but you can just edit your client's hostfile if you need to do this for testing.
Well, the flash player should just use the browser to make the connection and be done with it. We have a similar setup here. We use self-made certs, and communicate with the an AMF channel over HTTPS. My guess is though that our setup is different in that we load the flash application itself over an HTTPS channel, so it's talking from HTTPS to the same HTTPS server. Maybe you could try that? This is the setup for our Tomcat server:
Tomcat Server/Client Self-Signed SSL Certificate