Citizen.CreateThread(function()
function Initialize(scaleform)
scaleform = RequestScaleformMovie(scaleform)
while not HasScaleformMovieLoaded(scaleform) do
Citizen.Wait(0)
end
PushScaleformMovieFunction(scaleform, "SET_VEHICLE_INFOR_AND_STATS")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Detecting and Mitigating DDOS Attacks | |
#List all Finish (FIN) packets | |
machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 1 != 0' | |
#List all SYN and SYN-ACK packets | |
machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 2 != 0' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[The MIT License (MIT) | |
Copyright (c) 2017 IllidanS4 | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPtables DDOS protection : | |
In my config i assume the server is not a router and already profit from some filtering by the hosting company on shitty | |
networks. | |
I have tested this on ubuntu server 18.04 with the kernel 4.15.0-36-generic. | |
Protect from malformed packet, ACK FIN RST attack and SYN-flood. | |
Flood which profit of TCP-KEEPALIVE (so there a no SYN packet) should be handled by the web server (rate-limit in nginx for | |
exemple). Connlimit can also be helpfull to limit the number of connexion per ip. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function CreateNamedRenderTargetForModel(name, model) | |
local handle = 0 | |
if not IsNamedRendertargetRegistered(name) then | |
RegisterNamedRendertarget(name, 0) | |
end | |
if not IsNamedRendertargetLinked(model) then | |
LinkNamedRendertarget(model) | |
end | |
if IsNamedRendertargetRegistered(name) then | |
handle = GetNamedRendertargetRenderId(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import math | |
import time | |
import threading | |
import webbrowser # To launch the remote debugging page | |
import win32api # | |
import win32con # pip install pywin32 | |
import win32gui # |
As of server version 2377, support was added to FiveM to run a custom streaming proxy similar to cfx.re, but proxying the data connection (UDP) as well. This can be accomplished very easily with nginx acting as a proxy, and you can combine the caching proxy with it.
- Nginx 1.17+ (1.16 absolute minimum, guide tested on 1.17)
- Server with reasonable network bandwidth (500mbps uplink strongly suggested)
- FXserver version 2377 or later
- SSL certificate for the domain you're using (highly recommended)
OlderNewer