Skip to content

Commit

Permalink
Change default masterlist server
Browse files Browse the repository at this point in the history
  • Loading branch information
spmn committed May 14, 2016
1 parent bf84759 commit 6e80979
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@
*.exe
*.out
*.app

# Visual Studio Stuff
*.sdf
*.opensdf
Debug/
Release/
ipch/
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

4 changes: 2 additions & 2 deletions hook/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6e80979

Please sign in to comment.