View Single Post
iretr_0
New Member
Join Date: Jul 2022
Old 07-25-2022 , 20:03   Re: [ANY] Simple Fastdownload
Reply With Quote #20

Quote:
Originally Posted by iretr_0 View Post
Hey, first of all thanks for the work.
To anyone having issues with only your localhost being able to get download the maps check your sv_downloadurl:
"sv_downloadurl" = "http://192.168.0.16:27015/fastdl" ( def. "" )
Mine always defaults to my internal ipv4! all you have to do in this case is change sv_downloadurl_hostname to your public ipv4

Anyways that's all good and all but I haven't figured out a way to automate this process.

I have two issues:

I would like to dynamically get/store in a variable (prefferably using srcds stuff only, no .sh or .bat) my public ipv4 so I can, in a cfg file, set sv_downloadurl_hostname to my public ipv4.

and...

I've tried using a fixed value for it but since sv_downloadurl_hostname is a command only available once it's plugin is loaded I can't just plug it into the server.cfg. If anyone knows a way around that too I would love to hear about it.

Anyways, that's where I'm stuck at. I would love some help.

Update:
I solved both my issues.

The second issue (regarding sv_downloadurl_hostname not saving): Turns out it was being overwritten by another CFG. This was easy to fix, the config file for this plugin like so many others can be found under .\tf\cfg\sourcemod\plugin.simple-fastdownload.cfg

The first issue (regarding getting my public ipv4 on server start): I made a power shell script that does that (yes I'm on windows...). Just set a var to this "$ip = Invoke-RestMethod ipinfo.io/ip" command and replace it in a string. You can output the result using OutFile like so: "$message | Out-File -Encoding ASCII -FilePath .\tf\cfg\sourcemod\plugin.simple-fastdownload.cfg"

Yeah... I feel like a lot of the userbase of this plugin are going to be people like me who just want to run an on demand local server for friends to join or to test out plugins so I hope this helps people. PM me for the full ps1 script if you can't do it yourself!

Thanks again to OP for making this. Never again filezila.... never again....
iretr_0 is offline