From 6e809797f819b5f199124bd23ab957db663eda40 Mon Sep 17 00:00:00 2001 From: spmn Date: Sat, 14 May 2016 20:18:55 +0300 Subject: [PATCH] Change default masterlist server --- .gitignore | 7 +++++++ README.md | 14 +++++--------- hook/hook.cpp | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index b8bd026..9406f23 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,10 @@ *.exe *.out *.app + +# Visual Studio Stuff +*.sdf +*.opensdf +Debug/ +Release/ +ipch/ diff --git a/README.md b/README.md index 53a1c86..19ca853 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Fixes the infamous SA-MP internet tab bug. ## How does it work? Simple! This fix is composed of two main parts: -1. A php script which parses [SACNR Monitor](http://monitor.sacnr.com/) two times a day and saves all server IPs on my (free) webhost server in the format used by SA-MP client; +1. A php script that parses [SACNR Monitor](http://monitor.sacnr.com/) and writes in a file all server IPs in the format used by SA-MP client; Why SACNR? Because they have implemented an API which allows adding of new servers to their Monitor by simple running a filterscript. Details [here](http://monitor.sacnr.com/api.html). -2. A DLL injected into SA-MP client which redirects all the traffic outgoing to SA-MP Masterlist to the server specified in `masterlist_fix.cfg` (default: my webhost server) +2. A DLL injected into SA-MP client which redirects all the traffic outgoing to SA-MP Masterlist to the server specified in `masterlist_fix.cfg` (default: [nickdodd25](https://github.com/nickdodd25)'s server) ## My server still is not appearing on the internet tab. @@ -28,14 +28,10 @@ You can register your server by following these [steps](http://monitor.sacnr.com ## How can I contribute? There are several parts in this fix which can get better: -1. Masterlist server - * this is currently hosted on a free account, which means: - * it may or may not handle heavy traffic; - * the account can be terminated at any time. - * if you have a webhost/VPS/dedi with unlimited bandwidth and relatively high transfer speed at your disposal then you can help this project by hosting the masterlist. Just upload `update_masterlist.php` to your server, `crontab` it and create an issue containing the link to `masterlist.txt`; - * or better, if you're a maintainer of SACNR Monitor API and do not mind high traffic, then you can help by directly providing a list of servers in SA-MP client format, so the parser will be no longer needed. +1. ~~Masterlist server~~ + * thanks to [nickdodd25](https://github.com/nickdodd25), masterlist is now hosted on a powerful machine so it will support heavy traffic; + * if you're a maintainer of SACNR Monitor API and do not mind high traffic, then you can help by directly providing a list of servers in SA-MP client format, so the parser will be no longer needed. 2. Injection code * this fix is currently injected into SA-MP process by a helper executable `masterlist_fix.exe` which means that the user has to open THAT executable instead of the original executable `samp.exe` * an auto injector (like ASI Loader) would be a perfect solution - diff --git a/hook/hook.cpp b/hook/hook.cpp index d68b27e..7c38d57 100644 --- a/hook/hook.cpp +++ b/hook/hook.cpp @@ -5,8 +5,8 @@ #pragma comment(lib, "detours.lib") #pragma comment(lib, "ws2_32.lib") -#define MASTERLIST_HOST_DEFAULT "masterlist.freeho.st" -#define MASTERLIST_PATH_DEFAULT "/sa-mp_masterlist/masterlist.txt" +#define MASTERLIST_HOST_DEFAULT "monitor.teamshrimp.com" +#define MASTERLIST_PATH_DEFAULT "/list/masterlist.txt" int (WINAPI *pSend)(SOCKET s, const char* buf, int len, int flags) = send; int WINAPI HOOK_send(SOCKET s, const char* buf, int len, int flags);