The International Simutrans Forum

 

Author Topic: Spurious network activity  (Read 537 times)

0 Members and 1 Guest are viewing this topic.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Spurious network activity
« on: June 19, 2018, 10:48:24 AM »
I just updated my SVN working directory and built a new Simutrans executable. When I loaded my game, the firewall suddenly triggered a message that sim.exe was trying to access the Internet. I can't see why Simutrans would want to do that when loading a game, so I just blocked it. Simutrans seemed to have no problems with that, except for the FPS hit it took from being frozen.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Spurious network activity
« Reply #1 on: June 19, 2018, 06:45:22 PM »
No connection attempts here and no firewall request. Are you sure you did not run with server commands or server settings in config?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Spurious network activity
« Reply #2 on: June 19, 2018, 07:32:38 PM »
I've never actively done so or never intend to do. So unless running as server is now default and must be explicitly turned off, that can't be it.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Spurious network activity
« Reply #3 on: June 20, 2018, 02:47:12 AM »
Did you compile with miniupnpc?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Spurious network activity
« Reply #4 on: June 20, 2018, 08:17:43 AM »
Probably not. I did no active changes in my setup. And miniupnpc doesn't sound like something that would come with MSYS2 out of the box. Furthermore, Simutrans was trying to access some server on port 80 (I don't remember the IP), so it was likely HTTP traffic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: Spurious network activity
« Reply #5 on: June 20, 2018, 12:30:09 PM »
Then it is most likely getting its IP (asking simutrans-forum.de/getIP.php). But it should do this only for starting a server. You did not open the game while (hosting at a server was checked?)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Spurious network activity
« Reply #6 on: June 20, 2018, 02:06:37 PM »
I double-clicked sim.exe as I usually do. On this occasion, I might have clicked new game and then closed the window in order to test out cursor behavior when panning the map around, and then opened the main menu and selected load game. If not, I simply selected load game from the welcome screen. Then I clicked on the game, and during the loading, or just as it finished, the firewall message popped up.

I think the IP-address started with a single digit, which I noted as unusual, possibly a 5. If it was (unintentionally) trying to host a game, this outgoing connection happened before it started listening for incoming connections, I think, or the firewall would have warned me about a program wanting to open a listening port instead.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Spurious network activity
« Reply #7 on: June 20, 2018, 06:31:52 PM »
I've figured out where the connect is coming from. It comes from loadsave_frame.cc line 77. Apperently it is trying to announce my Simutrans as a server to the Internet, even though "Start this as server" is not pressed and something called "server_announce" in simuconf.tab is commented out (and supposedly defaults to off).

r8476 seems likely to be the culprit. I would assume that everyone loading a save game in a recent version of Simutrans is reporting to some server that they are playing Simutrans, which might be illegal without their explicit consent.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Spurious network activity
« Reply #8 on: June 21, 2018, 04:45:55 AM »
Confirmed now, loading a savegame announces as a server always. Fix seems pretty easy though, just change the else to an else if (easy_server.pressed) {

Also, should that checkbox not be removed when without miniupnpc?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2525
  • Languages: EN
Re: Spurious network activity
« Reply #9 on: June 21, 2018, 05:30:14 AM »
Quote
which might be illegal without their explicit consent.
But it is so useful for tracking usage metrics! jk.

If this is in the latest release, another release is likely needed with this fixed. Do not want people to think we do not respect their privacy.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: Spurious network activity
« Reply #10 on: June 21, 2018, 06:12:36 AM »
The better correction is to not allow announces, if you do not run a server. I.e. simworld line 6821. This will also catch other illegal uses. SInce the port is zero in all those cases, is should never be registered at the server.