Jump to content

Improvements for the dedicated server


Alloc

Recommended Posts

My steam login is broken because steam take my local ip ( 192.168.. ) to auth. steam login is working for me but I can't make it works for my players.

 

For now my workarround was to change the permission to 2000 and put a passwd on a proxy before the webserver but I would like to use the steam login.

Link to comment
Share on other sites

My steam login is broken because steam take my local ip ( 192.168.. ) to auth. steam login is working for me but I can't make it works for my players.

 

For now my workarround was to change the permission to 2000 and put a passwd on a proxy before the webserver but I would like to use the steam login.

 

So I assume for other players (i.e. externals to your network) you do port forwarding through your router? Or do you use a reverse proxy like Apache?

At what point exactly do they see the internal IP? On Steam's OpenID login page and when returning from there they get redirected to your "http://<your local ip/port>/session/verify"?

Link to comment
Share on other sites

yes I was using nginx from a vps box I have to forward on my server at home but I try directly on the map port and same thing happen.

 

when they are on the steam login page it show my local ip and they are redirect to the local ip after the login. Steam should use my hostname and forget the ip.

 

Capture.jpg.d35425c04d0e8fec3a1ed002b05dd0ee.jpg

Link to comment
Share on other sites

If you tried directly without any proxy involved it should work just fine. The web page uses the HOST header from the HTTP request to figure out where to redirect to and that won't be changed by e.g. NAT routers.

 

A reverse proxy on the other hand could send a new HOST header as part of its request. I assume that's what nginx does by default. Apache has a "ProxyPreserveHost" directive for this that will fix it, nginx most likely has a similar directive.

Link to comment
Share on other sites

Hi, new here. I'm having trouble enabling the server fixes on alpha17. i've got the lastest game version (stable) and the lastest server fixes. they are in the Mods folder and are labeled correctly (ubuntu server) but they dont seem to pick up when i run the game. server was also setup using your server scripts.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for the delay.

If you set up the server with my Linux scripts it should work just fine. I'd recommend not installing them manually though but through 7dtd.sh updatefixes. That should get it done right. Either way, for more help we'd need more info, like a directory listing and a server startup log.

Link to comment
Share on other sites

2019-02-09T11:15:56 67.183 INF Error in Web.ctor: System.ArgumentException: Path is empty

at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0

at AllocsFixes.NetConnections.Servers.Web.WebPermissions..ctor () [0x00000] in <filename unknown>:0

at AllocsFixes.NetConnections.Servers.Web.WebPermissions.get_Instance () [0x00000] in <filename unknown>:0

at AllocsFixes.NetConnections.Servers.Web.Handlers.PathHandler..ctor (System.String _moduleName, Int32 _defaultPermissionLevel) [0x00000] in <filename unknown>:0

at AllocsFixes.NetConnections.Servers.Web.Handlers.SimpleRedirectHandler..ctor (System.String target, System.String moduleName) [0x00000] in <filename unknown>:0

at AllocsFixes.NetConnections.Servers.Web.Web..ctor () [0x00000] in <filename unknown>:0

 

booted it up and did nothing so not sure what caused it

Link to comment
Share on other sites

Looks like the same error:

2019-02-09T09:42:28 124.352 INF Error in Web.ctor: System.ArgumentException: Path is empty at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0 at AllocsFixes.NetConnections.Servers.Web.WebPermissions..ctor () [0x00000] in :0 at AllocsFixes.NetConnections.Servers.Web.WebPermissions.get_Instance () [0x00000] in :0 at AllocsFixes.NetConnections.Servers.Web.Handlers.PathHandler..ctor (System.String _moduleName, Int32 _defaultPermissionLevel) [0x00000] in :0 at AllocsFixes.NetConnections.Servers.Web.Handlers.SimpleRedirectHandler..ctor (System.String target, System.String moduleName) [0x00000] in :0 at AllocsFixes.NetConnections.Servers.Web.Web..ctor () [0x00000] in :0

 

 

It also detects my stack sizes are bigger

2019-02-09T09:45:42 318.260 INF Player with ID 171 has stack for "drinkJarBeer" greater than allowed (16 > 15)

2019-02-09T09:45:42 318.261 INF Player with ID 171 has stack for "drinkJarCoffee" greater than allowed (32 > 15)

2019-02-09T09:45:42 318.262 INF Player with ID 171 has stack for "foodBoiledMeat" greater than allowed (62 > 50)

2019-02-09T09:45:42 318.262 INF Player with ID 171 has stack for "drinkJarBoiledWater" greater than allowed (220 > 15)

2019-02-09T09:45:42 318.263 INF Player with ID 171 has stack for "ammoGasCan" greater than allowed (5000 > 1000)

2019-02-09T09:45:42 318.264 INF Player with ID 171 has stack for "medicalBandage" greater than allowed (19 > 10)

2019-02-09T09:45:42 318.265 INF Player with ID 171 has stack for "medicalFirstAidBandage" greater than allowed (22 > 10)

 

EAC disabled, but the server reboots. Gonna try uninstalling Alloc's :(

Link to comment
Share on other sites

On some servers I have seen that the live map has a check box to display the traders on the map.

Does anybody know how to add that to the map ?

That's custom code added by others and giving back seems to be feel bad to some :(

 

 

@Others: Suppose your issues are fixed as no one further commented after Curbolt's (probably correct) suggestion of updating?

Link to comment
Share on other sites

Haven't run into issues myself and edited map.js to have icons for traders (in webserver/js/) so it's now like this:

https://pastebin.com/RgwxL8wA

 

after that added a cart icon (cart.png) to the leaflet/images folder, dumped the prefabs.xml from my world folder in the main webserver folder and now I have little cart icons on top of all my traders :)

 

722XCBG.jpg

 

Anyone not too scared of jquery is probably also able to extend it further to display more icons based on prefabs.xml (my changes are on line 77-118). Hope it's of use to others, too!

currently it just looks through the whole prefabs and any prefab with "trader" in the name gets this icon (could also be used for i.e. skyscrapers if you wish).

Link to comment
Share on other sites

Haven't run into issues myself and edited map.js to have icons for traders (in webserver/js/) so it's now like this:

https://pastebin.com/RgwxL8wA

 

after that added a cart icon (cart.png) to the leaflet/images folder, dumped the prefabs.xml from my world folder in the main webserver folder and now I have little cart icons on top of all my traders :)

 

722XCBG.jpg

 

Anyone not too scared of jquery is probably also able to extend it further to display more icons based on prefabs.xml (my changes are on line 77-118). Hope it's of use to others, too!

currently it just looks through the whole prefabs and any prefab with "trader" in the name gets this icon (could also be used for i.e. skyscrapers if you wish).

 

Nice work! Now all I would like to have is a checkbox to enable/disable them on the map view.

Link to comment
Share on other sites

Nice work! Now all I would like to have is a checkbox to enable/disable them on the map view.

 

https://1drv.ms/u/s!AvzZsIAN_6-wgppujf7LxZx_i29l_g

 

Change to icon of your choice in line 601 and 602:

iconUrl: '/static/leaflet/images/layers.png',
iconRetinaUrl: '/static/leaflet/images/layers.png',

 

The checkbox for Traders is shielded behind web.map permission in webpermissions.xml.

If you want it behind another permission, change line 164 to another permission present in webpermissons.xml:

if(HasPermission ("web.map"))

 

If you want it to be visible always without any permissions, just remove the if statement on line 164 around:

layerControl.addOverlay (GetTraderMarkerLayer (map, mapinfo), "Traders");
layerCount++;

 

Cheers

Edited by Prisma501 (see edit history)
Link to comment
Share on other sites

https://1drv.ms/u/s!AvzZsIAN_6-wgppujf7LxZx_i29l_g

 

Change to icon of your choice in line 601 and 602:

iconUrl: '/static/leaflet/images/layers.png',
iconRetinaUrl: '/static/leaflet/images/layers.png',

 

The checkbox for Traders is shielded behind web.map permission in webpermissions.xml.

If you want it behind another permission, change line 164 to another permission present in webpermissons.xml:

if(HasPermission ("web.map"))

 

If you want it to be visible always without any permissions, just remove the if statement on line 164 around:

layerControl.addOverlay (GetTraderMarkerLayer (map, mapinfo), "Traders");
layerCount++;

 

Cheers

 

 

this compatible with cpm aswell?

Link to comment
Share on other sites

Hey there Alloc

 

I noticed there's some chrani panel files in the latest release link ( http://illy.bz/fi/7dtd/server_fixes.tar.gz ). Is that intentional? I don't see the same files in the source code.

 

unknown.png.475403bca5af4ccacd83107f3ad69f7d.png

 

 

EDIT: here's an example nginx config for reverse proxying the webmap. Might be useful for someone :)

 

server {

server_name map.example.com;

       location / {
               proxy_set_header X-Forwarded-Host map.example.com;
               proxy_set_header X-Forwarded-Server map.example.com;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_set_header Host map.example.com;
               proxy_http_version 1.1;
               proxy_pass_request_headers on;
               proxy_set_header Connection "keep-alive";
               proxy_store off;
               proxy_pass http://localhost:8082;
       }


}

Edited by Catalysm (see edit history)
Link to comment
Share on other sites

@Xenophobed44: Would at least need some logs.

 

@catalysm:

Yeah, seems like I forgot to clean up my local folder, but this must've been in for some time now. It was never actually used, iirc I only diffed the map.js file from ecv's version and mine to get his changes for Leaflet 1 in.

 

@ecv:

Sorry I had those files in, not sure if those were ever public from your end :(

Link to comment
Share on other sites

Everything I do is available to the public anyway through git, don't worry. It's also a discontinued project, was part of my learning curve :) I believe in free software all the way. Probably because I don't make my money writing code. It's just when the need arises, and nobody else is doing it, that I go to work on stuff ^^

Link to comment
Share on other sites

@alloc Is there a way to add our own permission to be used in the webpermission.xml file ?

 

It would be handy for when adding new stuff to the map, like the earlier mentioned traders locations, so you have your own specific permission setting for that instead of having to use one of the already defined once?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...