Using Airconsole on a standard University/Corporate network for dev - airconsole

I tried to make an airconsole game at my university. Unfortunately like nearly all universities devices are not able to see each other on the network. That means I can't serve pages from my laptop to my phone. So, the standard
http://www.airconsole.com/#http://<myipaddress>:8080/game/
Does NOT work. This makes it impossible for university students and people at game jams at universities to make games for airconsole.
I even tried setting up a remote server at digital ocean, uploaded my code there and then using
http://www.airconsole.com/#http://<ipaddressofdroplet>:8080/game/
Even that didn't work. Since I was on a deadline (Global Game Jam 2016) eventually I just gave up.
Is there a workaround or is making games for airconsole on a typical university network just impossible?

You can use tools like https://ngrok.com/ to make your localhost public even if there is client isolation.
Let's say you are running your game on http://192.168.0.36:7842/ and http://192.168.0.36:7842/controller.html is not accessible from a your smartphone.
Then run the following command:
ngrok http 7842
This will output you something like
Tunnel Status online
Version 2.0.19/2.0.20
Web Interface http://127.0.0.1:4040
Forwarding http://8941ec1a.ngrok.io -> 192.168.0.36:7842
Forwarding https://8941ec1a.ngrok.io -> 192.168.0.36:7842
You can see that http://8941ec1a.ngrok.io now forwards to http://192.168.0.36:7842
Now start your browser on:
http://www.airconsole.com/#http://8941ec1a.ngrok.io/ and you should be able to connect your smartphone.
Note to Unity Developers: You need the latest airconsole unity plugin from www.github.com released on 2016-02-01 and you should select "Normal" as the browser start mode.

Related

Debug MS Teams application without ngrok?

I am working on MS Teams development. I installed the MS Teams toolkit in VS Code, set up my subscription with Azure and sideloading is active in my tenant.
When I run the app, it tries to install ngrok. This step fails as my organization does not allow running ngrok or other words tunnelling from our company laptop. We can run this on a VM to go around this but VM is not always available.
I am looking for a resolution for below scenarios:
Is there a way to debug MS Teams application without ngrok?
If we need a https URL, is it possible to configure a web app to facilitate that?
I tried removing install ngrok step from: /.vscode/tasks.json, but there are subsequent steps it the file dependent on that
I've done quite a bit of research on this question myself as I'd been getting a lot of pushback from our IT department regarding the security threats that come with using a tunneling service like ngrok. It eventually led me to this video posted on the MS forums from a Microsoft engineer who explains it clearly.
What it comes down to is that the Teams client (browser/desktop) approaches webservices (configured in the manifest file) differently depending on the type of interaction. If you're testing configurable tabs, task modules or configuration pages, then you can easily route the app to those sites running on your localhost through the manifest. The Teams client will approach them directly. Problems start to arise when you want to debug what happens when you use a bot or message extension, outgoing webhook or MS Graph change notifications (just quoting the video here, there might be other scenarios).
Basically, what happens is that the Teams client goes through a Microsoft-hosted service first, called Microsoft Teams Services, which will then approach your bot framework cloud service (typically an Azure Bot resource). This then forwards any incoming messages to whatever endpoint you have configured. What happens in these separate stages isn't completely clear to me, but what I do know is that whatever is typed by the user in the Teams client is translated to a JSON structure that can be interpreted by your server-side bot code (for C# apps, this is typically your CloudAdapter-derived class working with your TeamsBot-derived class). These messages are then routed to the relevant TeamsBot class method based on properties in the JSON.
Now the issue that ngrok solves is that, when the Teams client goes onto the public internet to reach the MS Teams Services server and then the Azure Bot resource, it then needs a public address to route the traffic to. It doesn't know about your local network anymore. As ngrok sets up a TCP tunnel between their server and your local PC, it is able to route traffic coming to their server to your PC. The Azure Bot now has a public address to send the messages to.
To my knowledge, there is no way to circumvent this as long as Teams client inner workings always make it go outside of your local network. For chat scenarios, the Bot Framework Emulator might offer a solution for unit testing. As far as I can see it performs the translation of chat input to the JSON message model of the Bot Framework and routes it to a local address for your chatbot to process it. Unfortunately, this doesn't work for chat message extension type messages.
As for the question whether ngrok can be avoided, I think the answer is definitely yes but you would need an alternative. There's several alternatives around that you might be able to host yourself if you have the technical know-how. Depending on your IT department, being in control of the public-internet-facing server might be a more viable solution for them. Another option is to host ngrok on a VM or cloud machine with less access to your internal network's resources than your PC/laptop has and test the code there.
TL;DR: If the the feature you're testing is approached directly by the Teams client, you can enter localhost in the manifest and debug it. If you're testing a feature that the teams client approaches through Microsoft Teams Services and the Bot Framework, you need to find a way to expose your code to the public internet. You can use ngrok or host your own alternative depending on requirements.
use mkcert to generate a certificate for ex. localhost.test
add losthost.test to your host file
use https://localhost.test for debugging

Google Play Game Services Real-time Multiplayer stopped working

There was a global issue with Google Play games services. Since March 28, about half of users do not work online multiplayer. I get a lot of emails from users. The problem is really global. With her faced many developers. This may be due to the Google services update on users ' devices. This may be a regional problem. I am in Minsk (Belarus), however through vpn Germany at me earned. I apologize for my English.
onRoomCreated(int statusCode, Room room) method throws an error:
statusCode 4
Other references describing the problem:
https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/play/dP3BHrI1vN4/CB_pwgHlCQAJ
Google Play Service Real-Time Multiplayer is broken
https://github.com/playgameservices/play-games-plugin-for-unity/issues/2163
What I have found about this problem:
I have created simple android game with google play games service. When I test my game multiplayer works fine, I can create quick game or invite friends.
But the last few days I can not initialize multiplayer. I always get this error:
Error: onRoomCreated, status 4
Status 4: A network error occurred while attempting to retrieve fresh data, and no data was available locally.
Ok, I switch off the Real-time multiplayer in developer console and now error became:
Error: onRoomCreated, status 6003
Status 6003: This game does not support multiplayer.
This means that all my game Client ID and tester account are setting correct and error happens with network connection.
I created new game in game service developer console and connected another android app with different app id, but get the same status 4 error.
I try to remove Play Game and Play Market apps cash data and reinstall all it updates. Error is the same.
I try to unlock in-game achievements and it UNLOCKED correct and show them in game description in Google Play Game app.
I downloaded several apps from play store, and get Play Games service error while creating online game. I read app reviews and some people write about this error.
I create VPN connection and try to init multiplayer and all works fine! Game room is created without any error!
What I have found:
If I try to init multiplayer without VPN tunnel there is SSL error in logcat
I/libjingle: BeginSSL: talk.google.com
W/libjingle: Warning(openssladapter.cc:388): ContinueSSL -- error 0
W/libjingle: Warning(openssladapter.cc:397): OpenSSLAdapter::Error(ContinueSSL, -1)
I/libjingle: SSL Cleanup
Error: onRoomCreated, status 4
With VPN tunnel SSL connection start normally, provide connection information and multiplayer game works.
I am from Russia.
Testing devices:
Nexus 5, Android 6.0.1, Google Play Games (5.5.81), Play Market (9.3.14-all)
Nexus 5X, Android 8.1.0, Google Play Games (5.5.81), Play Market (9.4.18-all)
Device factory reset also did not help.
In my build.gradle:
compile "com.google.android.gms:play-services-games:12.0.1"
and 11.8.0 version is not working too.
This problem happens not only with mobile network internet, with wired internet (through wifi connection) it does not work too.
I create VPN tunnel using Turbo VPN android app, and multiplayer works, but not with all countries, for example if I create VPN through US and Netherlands multiplayer works, through UK and Germany not.
And the most important thing is that it's been 7 days, but Google has not done anything!
Link to google issue tracker: Google Play Multyplayer Not Work!! (issue 77501859)
This is a known issue on the Google side. Our engineers are working to resolve the issue.

Invoke CNA on iOS8 device

I am working on a network controller based on Raspberry Pi 2. I have nicely working WiFi AP, DHCP server, captive portal (via DNSmasq) and a web server. The unit is fully offline, no internet access is available.
My only problem now is that users need to initiate interaction by running their browser and typing in a random domain so they are served my content.
I was searching the internet for a way to make my iPhone initiate captive network assistant, but couldn't find a way to do so on iOS 8.
Given that my network is offline with no access to the internet it is clear to me that my iPhone detected a captive portal as it presumably pings many websites in order to determine it's online status. Why doesn't it display my login screen automatically?

Chromecast for digital signage

I was hoping that someone with chromecast experience could help me with the following.
I want to make a simple digital signage application using chromecast. My plan is to set up a bunch of monitors with chromecast attached. Each monitor would point to a particular URL on the local network -- not a public facing web site. Each one would refresh its view every few minutes, completely replacing its content with the information on the web server.
I'd like to do this without mirroring, so that the chromecast itself would keep reloading the page without another device helping it along.
Can someone point me in the right direction?
Maybe start with the Chromecast developer guide: https://developers.google.com/cast/
From here you could choose to use the API here: https://developers.google.com/cast/docs/downloads
When you're ready to release it you probably need to register an API key with them for your sign app here: https://developers.google.com/cast/docs/registration
Good luck with your app.
From the sounds of it, Greenscreen.io would be perfect for this application. Especially when you're running a local server.
I want to do a similar digital signage app, but ended up needing to go for Raspberry Pi's with wifi that connect to a public webpage. I'd have preferred to use Chromecast for it though!

How does geolocation work on a windows PC on wired broadband connection?

I'm trying to develop a web app which uses geolocation, and to begin with it worked fine on my Windows 7 PC at home, both in Chrome and Firefox.
It still works fine on mobile browsers, but has stopped working on both browsers on my PC, which made me wonder how it actually works on my PC - is it querying a geographical database of IP addresses that could now be blocking me due to overuse?
Is there any way to change the settings? The "Location and Other Sensors" control panel tells me there are no sensors installed, and nothing shows up in the event log for "Location Activity".
Firefox gathers information about nearby wireless access points and
your computer’s IP address. Then Firefox sends this information to the
default geolocation service provider, Google Location Services, to get
an estimate of your location. That location estimate is then shared
with the requesting website.
From: https://www.mozilla.org/en-US/firefox/geolocation/
This is also how Chrome determines location (Sending IP and nearby Wi-Fi info to Google Location Services). It seems likely that Windows 7 does about the same thing, though I couldn't find specific details other than it uses postal code if available.

Resources