I have a project which may need open many tabs at the same time. And in each tab, there are at least 2 websocket. In some old version of IE11, the max number of websocket is only 6. As a result, when I open more than 3 tabs, the websocket will down.
To solve this problem, I have tried some work-around. I assign different websockets to different domains so that I can open at least 6 tabs. Then I use localstorage to share the websocket message, so I only need one master tab to receive message and other tabs just need listen the storage event. But this will lead to some qulity issue, when the master tab disconnect or be closed, I need to vote a new master tab, during which period the messages will be lost. Unfortunately my software cannot tolerate the data loss.
PS: Since all the project is in aws, I use aws IoT to implement websocket and as far as I know aws IoT cannot make data persistence.
You can try to set group policy which allows you to change the default limit of WebSocket connections per server. The default limit is 6; you can select a value from 2 through 128.
Please refer steps below to set this using group policy.
(1) Type gpedit.msc in Run window to open Local group policy editor.
(2) Navigate to location below.
Local Computer Policy > Computer Configuration > Administrative Templates >Windows Components > Internet Explorer > Security Features
> AJAX
(3) Find the setting named as Set the maximum number of WebSocket connections per server.
(4) double click on it to configure this setting.
(5) User can Enabled it and set the desired number of maximum connections between 2 to 128.
(6) click on OK to close the dialog.
(7) Restart the IE to take effect of changes.
Related
I want to block a program from accessing the local server "local host" (On windows) temporary so i can test random disconnections cases ... I tried adding a (rule) to the firewall for disabling both inbound and outbound in all networks types but the program just got block from accessing the internet not the local network
Moving on to an answer instead of a comment - nevertheless, more information on your use-case is greatly appreciated;
I think it is impossible to block access to localhost but allow internet access. Two reasons:
Networking works on different layers ("OSI layers") and localhost communication is looped back before firewall might filter (see ). Not so sure on this though.
localhost communication might be "basic" in a way that it is necessary for applications when they want to communicate via network.
UPDATE after OPs comment
I assume you are on Windows 10, and you know the path to the executable of the program you want to block.
Open "Windows Defender Firewall with Advanced Security".
On the left side, go to "Outbound Rules".
Then, on the right side click on "New Rule...".
A new window will open; Leave "Program" selected and click "Next".
Next to "This program path:" is a Button "Browse..." - select your program here. Click "Next..."
Select "Block the connection", then "Next...".
Select all three; Domain, Private and Public.
After click "Next..." choose an appropriate name, then click "Finish".
From now on, you can disable/enable this rule as you see fit.
Kinda hard to provide detailed answer having only the information you've provided, but I think this scenario can be easily tested with simple containers configuration: having both program under test and "localhost" service running in containers, you can randomly update container's network configuration to simulate connectivity issues.
You can use a reverse proxy like Fiddler and block all requests coming from this application to localhost.
If I understood what you mean then this will do:
To create a rule, select the Inbound Rules or Outbound Rules category at the left side of the window and click the Create Rule link on the right side. The Windows firewall offers four types of rules: Program – Block or allow a program. Port – Block or allow a port, port range, or protocol.
if you are using a third party anti-virus solution with a built-in firewall, go to the firewall option and black list/disable/prevent internet access to your app
Otherwise, disabling your firewall will not stop any access, as it will allow inbound and outbound traffic. you can prevent specific ports but disabling the firewall wall will not only do what mentioned before but it will also leave your device vulnerable for online threatts
Try these 3 simple steps.
run your program
Open cmd ( please check you need admin access for this, if yes then run as admin)
Run the following command to see at which port the localhost is listening.
netstat -ano | findstr :
e.g (if your localhost is listening at port 3900 the command will be as follow;
netstat -ano | findstr :3900
the result will be shown on cmd console, the last column is PID (Process id)
We will just kill that process which will eventually stop the localhost server to listen any request from any source.
taskkill /PID /F
< PID > that you will get from above command.
in this case, only the localhost will stop it's service, but you application will keep communicating to outer network, internet.
The timing section of the Firefox Network Monitor documentation, "Blocked" is explained as:
Time spent in a queue waiting for a network connection.
The browser imposes a limit on the number of simultaneous connections that can be made to a single server. In Firefox this defaults to 6
Is the limit on the number connections the only limitation? Or is the browser blocked waiting to get a connection from the OS count as blocked too?
In a fresh browser, on a first connection, before any other connection is made (so the limit should not apply here), I get blocked for 195 ms.
Is this the browser waiting for the OS? Was does "Blocked" mean here?
We changed the Firefox setting (about:config) 'network.http.max-persistent-connections-per-server' to 64 and the blocks went away. We changed it back to 6. We changed our design/development method to a more 'asynchronous' loading method so as not to have a large number simultaneous connections. The blocks were mostly loading a lot of png flags for locale settings.
I have a server that takes several seconds to respond, which allowed me to cross-reference the firefox measurement with a wireshark trace. I see that the first SYN is sent out immediately. The end of the "Blocked" time corresponds to when the Server Hello comes back.
I couldn't relate the end of "TLS setup" to any wireshark packet. It extends a few seconds belong the last data that is exchanged on the initial TLS connection.
Bottom line: it doesn't look like the time spent in "Blocked" and "TLS setup" is very reliable, at least in some cases.
My setup has a TLS reverse proxy that forwards the connection with SNI. I'm not sure if that might be related.
Time spent in a queue waiting for a network connection.
The browser imposes a limit on the number of simultaneous connections
that can be made to a single server. In Firefox this defaults to 6,
but can be changed using the
network.http.max-persistent-connections-per-server preference. If all
connections are in use, the browser can't download more resources
until a connection is released.
Source : https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
It's very clear that the browser fixes the limit to 6 concurrent connections per server (domains/IP), the OS question is not very relevent.
In my case both waiting for network connection and DNS lookup times were pretty high, up to 2 seconds each, caused significant page load times if the page was loaded for the first time. Firefox was freshly installed without addons and just started with no other opened tabs. I tried on both Ubuntu 18.04 LTS and Ubuntu 19.04 with the same results. Although my ISP doesn't provide support, my router assignes IPv6 addresses. As it turned out the problem was the IPv6 broken network, which forced Firefox to fall back to IPv4 (of course after some time(time-out)). After I turned off the IPv6 support in Linux the requests speeded up significantly.
Here is a relavant discussion: https://bugzilla.mozilla.org/show_bug.cgi?id=1452028
I encountered this error whilst using an Angular 9 'dist' deployment. I discovered that the error appeared because I was trying to access an unreachable API, according to the specified IP address and port.
Therefore to solve it, I just have to reference a valid and accessible API.
I have been using a Raspberry Pi 3 along with IBM Watson IoT platform and was just deploying some flows. However, I think I may have mixed up the device id between Gateway and Device.
When I registered my Raspberry Pi as a Device and a Gateway, I gave both connections the same Device ID. In hindsight, I can see why this might have been stupid. I am just going to disconnect all connections and create two new connections. However, I have a different problem right now. Whenever I try to launch NodeRed from my Raspberry Pi, I get the following log
3 Feb 17:07:27 - [error] IBMIoT: Error: Connection refused: Not authorized
[BaseClient:connect] Iotfclient is offline. Retrying connection
[BaseClient:onClose] Connection was closed.
This just keeps repeating over and over again, and I have no idea what to do to fix it.
That suggests you still have an IoT node in your flow with the incorrect credentials.
Assuming you are running Node-RED 0.15 or later, open the search dialog (Ctrl-. on 0.15 or Ctrl-F on 0.16) and search for ibmiot. That will reveal any existing configuration nodes you have. Clicking on one in the search results will reveal it in the Config node sidebar tab. Double click on it and either delete it or correct the credentials.
If you're on an older version (I suggest you upgrade), you can open the config node sidebar from the dropdown menu and manually look for the ibmiot nodes.
I have a Windows 7 / 8.1 Laptop in a docking station connected via 2 networkadapters(LAN & WiFi) to 1 private network.
Now an application should connect to a Server inside this private network but first prio should have the LAN adapter. If the laptop gets removed from the docking station it should switch automaticaly to the WiFi adapter without losing connection or TCP packages.
I'm at the opinion that not the application layer is responsible for that. The switching and TCP packet resending should be managed by the OS.
However I don't know how to setup Windows for that, any help is appreciated.
Go to your network adapters (Control Panel ->..) --> (then press alt for menu bar) -->
In the following settings you can change the order / priority of the adapters:
I dont know if connection can changed without losing connection or TCP packages shortly, cause Windows normaly says: I have a connection - why i should also hold the second active ?
Therefor you can look at the energyoptions of the pc for standbytime of the wifi-adapter and set it to highest performance, but i dont know if this will help properly.
Is there a way in the Windows Phone 7 emulator to turn off the network connection (without yanking the cable and turning wi-fi off on my laptop)? I want to test the dropping of network connectivity without having a physical device or doing anything physical outside the emulator or the Windows Phone 7 SDK/Tools.
As an alternative to physically disabling the network connection I also, sometimes, find it useful to redirect the network connections through Fiddler2. It's then possible to use breakpoints to intercept some connections. You can then use this add a delay before the server can respond. Or you can force a timeout.
I find this a useful approach when you want to test some connections failing but not others.
No, not really. I find it useful to check network connectivity and assign the result to a boolean value so that I can then modify the result to test scenarios where there's no network connection.
Сreate a firewall rule for the application C:\Program Files\Microsoft XDE\1.0\XDE.exe and then enable/disable this rule.
You can do this using a custom rule in Fiddler.
Rules -> Customize Rules...
Find the code which adds the "Simulate &Modem Speeds" menu option, and add your new option
//Add a menu option under Rules -> Performance
public static RulesOption("Simulate Flight Mode", "Per&formance")
var bFlightMode: boolean = false;
Now, at the top of the OnBeforeRequest function, add the following code
// Cause Fiddler to respond to all requests with a 502 (Bad Gateway) - the same error you get when you remove all networks
if (bFlightMode){
oSession.oRequest.pipeClient.End();
oSession.utilCreateResponseAndBypassServer();
oSession.oResponse.headers.HTTPResponseCode = 502;
oSession.oResponse.headers.HTTPResponseStatus = "Fiddler Simulating Flight Mode";
oSession.state = SessionStates.Aborted;
return;
}
Now, under the 'Performance' menu, you can select 'Flight Mode' - or whatever you want to call it.
(Based on an #EricLaw Google Groups post)