https://cookbook.fivem.net/2019/10/29/optimizing-resource-downloads-using-a-caching-proxy/
Is there a way to get this working on windows ? I’ve installed docker on windows and I’ve been trying to configure it for like 2 hours now without any success…
Thank you
1 Like
Please provide any info, like your current server.cfg (or fileserver_add commands executed at runtime) and if you get any errors or so
1 Like
The problem is not my fileserver_add the problem is that I can’t configure fxproxy on windows, I actually tried to make my own script that copy the content of the cache and streaming into a new folder named webcache and I made a webserver based on that folder but I’m getting hash corrupted
corruption uncovered - privcache://unconfirmed/cache_06fba0a1 should hash to 68114de26e6283dd3aff1607de30b2b800337da4, but saved as d955afd6e1d221ef5f2e1eb95aa408f929b95602.
is there a tutorial on how to configure nginx and fxserver on windows cause I can’t get it to work
Have you set adhesive_cdnKey?
As the docs say:
# Old command, but **required** to not get corrupted cache entries.
adhesive_cdnKey "someSecurePassphrase"
[ 37531] [ GTAProcess] 7272/ ResourceCache::AddEntry: corruption uncovered - privcache://unconfirmed/cache_06fba0a1 should hash to 68114de26e6283dd3aff1607de30b2b800337da4, but saved as d955afd6e1d221ef5f2e1eb95aa408f929b95602.
adhesive_cdnKey
"adhesive_cdnKey" is "UprisingNumberOne"
default: ""
type: string
I don’t see why it doesn’t work, the md5 hash is the same on the cache folder, on the webcache folder and on my cache server on linux
C:\FiveM\Live-Server\cache\files\16challenger
File: resource.rpf
CRC-32: 7ff66770
MD5: a5fcca137e36402534afd7bc5f1681f8
SHA-1: 8c88cf92f7185edfbc63133332118067a24e353a
SHA-256: a0b6a7f6a3a3d4f45e2323d04d4310e2f8bbbb8b34f7535a80fb01456a2caac1
SHA-512: 2c7d499c7410cc3c8d6e8d66d54dbccf41160957d4273f2171996dde7b3fbba28cd8f6e865f7dbbe3b2003542de5781f5dd1e04ab16c699e42082ed9c54a7804
C:\FiveM\Live-Server\webcache\files\16challenger
File: resource.rpf
CRC-32: 7ff66770
MD5: a5fcca137e36402534afd7bc5f1681f8
SHA-1: 8c88cf92f7185edfbc63133332118067a24e353a
SHA-256: a0b6a7f6a3a3d4f45e2323d04d4310e2f8bbbb8b34f7535a80fb01456a2caac1
SHA-512: 2c7d499c7410cc3c8d6e8d66d54dbccf41160957d4273f2171996dde7b3fbba28cd8f6e865f7dbbe3b2003542de5781f5dd1e04ab16c699e42082ed9c54a7804
[root@cacherserver 16challenger]# md5sum resource.rpf
a5fcca137e36402534afd7bc5f1681f8 resource.rpf
Here is my server.cfg as requested by Era:
endpoint_add_tcp "*****"
endpoint_add_udp "*****"
sv_listingIPOverride "*****"
#vMenu
exec resources/vMenu/config/permissions.cfg
#set
set es_enableCustomData 1
set mysql_connection_string "server=localhost;database=fivem;userid=*******;password=*******"
set mysql_debug 0
set mysql_debug_output "console"
set mysql_slow_query_warning 200
set steam_webApiKey "*******"
sets locale "fr-CA"
sets Discord "https://discord.gg/umwZwwn"
sets SiteWeb "https://www.uprisingroleplay.com/"
sets activitypubFeed uprisingroleplay@mastodon.social
setr tspassword "*******"
setr rob_ready no
# CACHE
fileserver_add ".*" "http://51.79.48.92/files"
adhesive_cdnKey "UprisingNumberOne"
# NEEDED RESSOURCES
ensure mapmanager
ensure chat
ensure chat-uprising
ensure spawnmanager
ensure sessionmanager
restart sessionmanager
ensure fivem
ensure baseevents
ensure connectqueue
ensure interactsound
# DISCORD
ensure discordbot
ensure discord_perms
ensure discord_whitelist
# ESSENTIAL
ensure async
ensure cron
ensure instance
ensure mysql-async
ensure essentialmode
ensure esplugin_mysql
ensure es_extended
ensure es_admin2
ensure fxmigrant
ensure vMenu
ensure vmenulog
ensure Web
# UPRISING SYSTEM
ensure uprising_base
ensure uprising_admin
ensure uprising_loading
# SCRIPTS ESX
ensure esx_accessories
ensure esx_addonaccount
ensure esx_addoninventory
ensure esx_addons_gcphone
ensure esx_advancedfishing
ensure esx_barbershop
ensure esx_basicneeds
ensure esx_billing
ensure esx_launderer
ensure esx_carwash
ensure esx_smoke
ensure esx_clip
ensure esx_datastore
ensure esx_dmvschool
ensure esx_doorlock
#ensure esx_drugs
ensure esx_drugeffect
ensure esx_clotheshop
ensure esx_clothingchange
ensure esx_checkdeathcause
ensure esx_holdup
ensure esx_holdup_banks
#ensure esx_holdup_jewelery
ensure esx_identity
ensure esx_inventoryhud
ensure esx_inventoryhud_trunk
ensure esx_garage
ensure esx_garage_aircraft
ensure esx_garage_boat
ensure esx_jb_realtimejailer
ensure esx_jb_trailer
ensure esx_license
ensure esx_locksystem
ensure esx_lscustom
ensure esx_toplscustom
ensure esx_mask
ensure esx_optionalneeds
ensure esx_pharmacy
ensure esx_property
ensure esx_rpchat
ensure esx_shops
ensure esx_skin
ensure esx_bike-rental
ensure esx_society
ensure esx_status
ensure esx_tattooshop
ensure esx_teleports
ensure esx_ktackle
ensure esx_thief
ensure esx_vehiclepush
ensure esx_weaponsaccessories
ensure esx_weaponshop
ensure esx_holdsterweapon
# MENUS
ensure esx_menu_default
ensure esx_menu_list
ensure esx_menu_dialog
ensure nb_menuperso
ensure radialmenu
ensure skinchanger
ensure gcphone
# JOBS
ensure upr_avocat
ensure upr_aircraftshop
ensure upr_ambulance
ensure upr_ammunation
ensure upr_boatshop
ensure upr_burgershot
ensure upr_gouv
ensure upr_joblisting
ensure upr_jobs
ensure upr_mechanic
ensure upr_topmechanic
ensure upr_police
ensure upr_reporter
ensure upr_taxi
ensure upr_tequila
ensure upr_unicorn
ensure upr_vehicleshop
#ensure upr_vigneron
ensure upr_yellowjack
# GANGS
ensure upr_angelofdeath
ensure upr_ballas
ensure upr_bloods
ensure upr_cartel
ensure upr_lostmc
ensure upr_mafia
# DIVERS SCRIPTS
ensure upr_blips
ensure upr_blipsjobs
ensure upr_banking
ensure upr_clientbase
ensure upr_deadscreen
ensure upr_idcard
ensure upr_knockout
ensure upr_noreticle
ensure upr_stungun
ensure upr_chairbed
ensure upr_emotes
ensure upr_mobile
ensure upr_trash
ensure upr_lottery
ensure upr_permis
ensure upr_fightzone
ensure upr_hidetruck
ensure upr_hostage
ensure upr_progressbar
ensure upr_fuelstation
ensure upr_vehcontrol
ensure upr_vehdamage
ensure upr_towing
ensure upr_radarpolice
ensure upr_anchor
ensure upr_servername
ensure upr_teleport
ensure upr_drugtp
ensure upr_safezone
ensure upr_libs
ensure upr_hud
ensure upr_pillboxbeds
# RADIO TEAMSPEAK
ensure tokovoip_script
ensure ls-radio
# BUILDING
ensure bob74_ipl
# NOT-CLASSED
ensure tab
ensure mythic_notify
#ensure hypnonema
###########################
# STREAMING
###########################
# MAPS
ensure m_benside
ensure m_burgershot
ensure m_cinema
ensure m_tpmechanic
ensure m_emergency
ensure m_court
ensure m_fightclub
ensure m_paletopolice
###########################
# CLOTHINGS
ensure upr_base
ensure upr_clothes
ensure upr_peds
ensure upr_others
###########################
###########################
# STREAMING AUTO
###########################
# CAR
ensure ems
ensure 16tahoe
ensure 17gt500
ensure 17silver
ensure taxi
ensure trailersmall
ensure rmodmi8
ensure gtr
ensure f82
ensure burgers
ensure surfboard
ensure flatbed3
ensure CorvetteC7
ensure 20trailboss
# NOUVEAU
ensure lp700
ensure 16challenger
# NOUVEAU POLICE
ensure upr_buffalo
ensure upr_fbuffalo
ensure upr_explorer
ensure upr_fdurango
ensure upr_fordcmd
ensure esx_showcommands
sv_scriptHookAllowed 0
rcon_password "*******"
sets banner_detail "https://i.imgur.com/3duPjU7.png"
sets banner_connecting "https://i.imgur.com/8g9dMKf.png"
load_server_icon logo.png
sv_hostname "[QC/FR] ^4Uprising Roleplay 🌆 ^0| ^8Strict Roleplay |🍄^3 6 Drogues ^0| ^8Concess 🚘🚢🚁^0|^4 33 Métiers 💼 ^0|^7 Discord: ^9discord.gg/umwZwwn"
sets tags "uprising, roleplay, quebec, drugs, gangs, rp, esx, qc"
# Permissions
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_ace group.admin anticheat.bypass allow
add_ace group.moderator anticheat.bypass allow
add_ace resource.uptime command.sets allow
add_ace resource.essentialmode command.add_principal allow
sv_endpointprivacy true
set onesync_enabled 1
sv_maxclients 128
#sv_master1 ""
sv_licenseKey *******
[ 21171] [ GTAProcess] 9832/ resources::ResourceCacheDeviceV2::DoFetch downloading resource.rpf (hash 68114de26e6283dd3aff1607de30b2b800337da4) from http://51.79.48.92/files/discord_perms/resource.rpf
[ 21171] [ GTAProcess] 9832/ ResourceCache::AddEntry: corruption uncovered - privcache://unconfirmed/cache_06fba0a1 should hash to 68114de26e6283dd3aff1607de30b2b800337da4, but saved as d955afd6e1d221ef5f2e1eb95aa408f929b95602.
[ 21187] [ GTAProcess] 9832/ ResourceCache::AddEntry: Saved cache:v1:d955afd6e1d221ef5f2e1eb95aa408f929b95602 to the index cache.
[ 21187] [ GTAProcess] 9832/ ResourceCacheDevice: downloaded resource.rpf in 127 msec (size 6144)
hash corruption here, downloaded the resource.rpf on my computer from the cache server
Compared the hash downloaded from the cache server with the one in my cache folder in fxserver
Both have the same hash
Both resource.rpf hash matches the one asked by the client (hash 68114de26e6283dd3aff1607de30b2b800337da4)
that’s wrong, the server should not be serving the files from cache/! it needs to be a reverse proxy with caching on the proxy.
there’s a reason the example shows a reverse proxy and not ‘copying the files’.
2 Likes
Nvm, figured it, thanks <3
What did you do? Im trying to do this on a windows as well and would love to get some help