You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Hosted Forums > Wormbos Area > Suggestions

Reply
 
Thread Tools Display Modes
  #1  
Unread 5th April, 2007, 02:37 PM
Taboen Taboen is offline
Forum Newcomer
 
Join Date: Apr 2007
Posts: 6
Default Multiple redirect mutator

I don't know if this is possible, but it would be great.
My store is, I have my own server, I use uz.gameservers.net as redirect server. The other day I found another redirect server, uz.unrealadmin.org, yours(of this site) So I've been trying to find a way of using multiple redirect server, seems that it's not possible.
Could you make one or it that impossible?

Last edited by Taboen : 5th April, 2007 at 02:38 PM. Reason: misstype
Reply With Quote
  #2  
Unread 5th April, 2007, 02:46 PM
Wormbo's Avatar
Wormbo Wormbo is offline
out of order
 
Join Date: Sep 2003
Posts: 3,383
Default

First of all: uz.unrealadmin.org is not "my" redirect, just as unrealadmin.org is not "my" site. Secondly, I think the UnrealAdmin redirect already includes the GameServers.net redirect.
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives
Quote:
<@Mych|Lockdown> ...and the award for the most creative spelling of "Jailbreak" goes to ... "Gandis Jealbrake Server"
Reply With Quote
  #3  
Unread 6th April, 2007, 01:01 PM
Taboen Taboen is offline
Forum Newcomer
 
Join Date: Apr 2007
Posts: 6
Default

With yours I ment of this site. About the redirect, I didn't know, thank you!
Reply With Quote
  #4  
Unread 21st March, 2012, 03:39 AM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Default

just wondering here but what would be involved in making ut capable of having multiple redirect capabilities?.. anyone?

surely it is possible.. what does someone have to do ?.. edit the ipdrv.dll and or some other core file?
Reply With Quote
  #5  
Unread 21st March, 2012, 08:01 AM
medor medor is offline
Holy Shit!!
 
Join Date: Nov 2006
Location: France
Posts: 1,845
Default

which would be cool to It's allocated to the player can set to somes redirections on his UT :

If missing uz on the server the UT player can take on others redirections.With no mismatch.
__________________
UT99 files







Last edited by medor : 21st March, 2012 at 08:11 PM.
Reply With Quote
  #6  
Unread 21st March, 2012, 01:26 PM
Mc.Gugi Mc.Gugi is offline
Unstoppable
 
Join Date: Mar 2007
Posts: 208
Default

In UT2004 it is possible to use multiple redirects by writing a mutator which overrides the OverrideDownload function.
This option doesn't exist in UT99 though (afaik).
__________________
Unreal Dependencies: UnrealDeps (Updated: 20.04.11)
Check dependencies of unreal packages; uz, uz2, uz3 standalone compression/decompression

A multifunctional UT2004 mutator: Clan Manager 1h 6T (Updated 04.07.09)
(Clanmember-/Admin-enter-messages, Clantag-Protection, Clanchat, Player-Logging, AFK-Detector, WhoIs, "second" private server to keep non-clanmembers out and much more.) Source included.

Check client screenshots for cheats (an UT2004-Mutator): Screenshot Sender (Updated: 27.11.08)
Reply With Quote
  #7  
Unread 21st March, 2012, 03:05 PM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Quote:
Originally Posted by back4more View Post
just wondering here but what would be involved in making ut capable of having multiple redirect capabilities?.. anyone?
You can work around it with a php script.. just remember that every file will be downloaded via the web server where the script is installed.

Here is something {OCA}INSANEroba made for my servers many years ago:

Code:
<?
// Setup your sources here (do NOT put ending / in any location)
// L for local files - path to directory with .uz files relative to script position
// H for http files - complete url of directory with .uz files
// F for ftp files - complete url of directory with .uz files (un/pw as part of url)
// $sources[X] - start with 0 as X and add +1 for each new source
// lower X = higher priority

$sources[0] = array('http://uz.gameservers.net','H');
$sources[1] = array('http://uz.ut-files.com','H');
$sources[2] = array('http://www.snakeservers-redirect.net','H');

// $sources[X] = array('ftp://username:[email protected]/path_to_remote_dir','F');

// ==============================

$file = $_SERVER["QUERY_STRING"];
$sent = false;
foreach ($sources as $source) {
   if (SendFile($source[0],$source[1])) {
      $sent = true;
      break;
      }
   else continue;
   }
if (!$sent) header('HTTP/1.1 404 Not Found');
exit();

function SendFile($location,$type) {
global $file,$urlsize;
$fileok = false;
if ($type == "L" and file_exists($location."/".$file.".uz")) $fileok = true;
elseif ($type == "H" and url_exists($location."/".$file.".uz")) $fileok = true;
elseif ($type == "F" and ftp_exists($location."/".$file.".uz")) $fileok = true;
if ($fileok) {
   header("HTTP/1.1 200 OK");
   header("Status: 200 OK");
   header("Content-Type: text/plain; charset=UTF-8");
   if ($type == "L") header('Content-Length: '.filesize($location."/".$file.".uz"));
   elseif ($type == "H" or $type == "F") header('Content-Length: '.$urlsize);
   $fp1 = fopen($location."/".$file.".uz","r");
   while(!feof($fp1)) echo fgets($fp1, 500000);
   fclose($fp1);
   return true;
   }
else return false;
}

function url_exists($url) {
global $urlsize;
$urlsize = 0;
$a_url = parse_url($url);
if (!isset($a_url['port'])) $a_url['port'] = 80;
$errno = 0;
$errstr = '';
$timeout = 30;
if(isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])){
   $fid = fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout);
   if (!$fid) return false;
   $page = isset($a_url['path'])  ?$a_url['path']:'';
   $page .= isset($a_url['query'])?'?'.$a_url['query']:'';
   fputs($fid, 'HEAD '.$page.' HTTP/1.0'."\r\n".'Host: '.$a_url['host']."\r\n\r\n");
   $head = fread($fid, 8192);
   fclose($fid);
   if (preg_match('#^HTTP/.*\s+[200|302]+\s#i', $head)) {
      preg_match('/Content-Length:\s([0-9].+?)\s/', $head, $matches);
      $urlsize = $matches[1];
      return true;
      }
   }
else {
   return false;
   }
}

function ftp_exists($url) {
global $urlsize;
$urlsize = 0;
$a_url = parse_url($url);
if (!isset($a_url['port'])) $a_url['port'] = 21;
$ftp = ftp_connect($a_url['host'],$a_url['post'],10);
if (!$ftp) return false;
if (!ftp_login($ftp, $a_url['user'], $a_url['pass'])) return false;
$ftpsize = ftp_size($ftp, $a_url['path']);
if ($ftpsize <= 0) return false;
else {
   $urlsize = $ftpsize;
   return true;
   }
}
?>

Stuff it in a file, and point your UT server to it. I used it for years with no problems.
Reply With Quote
  #8  
Unread 21st March, 2012, 08:21 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Cool

Quote:
Originally Posted by PizzaMan View Post
You can work around it with a php script.. just remember that every file will be downloaded via the web server where the script is installed.

Here is something {OCA}INSANEroba made for my servers many years ago:
.
.
.

Stuff it in a file, and point your UT server to it. I used it for years with no problems.
Thanks Man! , Really appreciate your contribution. Yes I read that there was a way of doing this through php and this could be the script that others have mentioned about the web.

perhaps if it was setup on say ut.files.com / unrealtournament.ut99.fr.free somewhere with a bunch of Redirect servers implemented it would save other less web savvy users the problem of setting it up?.. (just a thought)

Again Thanks

Last edited by back4more : 21st March, 2012 at 09:07 PM.
Reply With Quote
  #9  
Unread 21st March, 2012, 08:33 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Question

Quote:
Originally Posted by PizzaMan View Post
Stuff it in a file, and point your UT server to it. I used it for years with no problems.
Just a Quick Query PizzaMan ;

what would be the RedirectToURL= (String) be in order to get this script to kick-in?

Cheers.
Reply With Quote
  #10  
Unread 21st March, 2012, 08:59 PM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Quote:
Originally Posted by back4more View Post
what would be the RedirectToURL= (String) be in order to get this script to kick-in?
URL of the php script. Just paste the above code in a text file named "get.php" and host the file on a php enabled web server with the necessary permissions.

You probably also need a .htaccess file:

Code:
Options +FollowSymlinks All -Indexes
order deny,allow
RewriteEngine on 
RewriteRule  ^(.*)\.uz$ get.php?$1 [PT]
Reply With Quote
  #11  
Unread 21st March, 2012, 09:02 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Cool

Quote:
Originally Posted by PizzaMan View Post
URL of the php script. Just paste the above code in a text file named "get.php" and host the file on a php enabled web server with the necessary permissions.

You probably also need a .htaccess file:

Code:
Options +FollowSymlinks All -Indexes
order deny,allow
RewriteEngine on 
RewriteRule  ^(.*)\.uz$ get.php?$1 [PT]
Wicked

Awesome Man.
Reply With Quote
  #12  
Unread 21st March, 2012, 04:49 PM
UTrustedPlayer's Avatar
UTrustedPlayer UTrustedPlayer is offline
Godlike
 
Join Date: Nov 2011
Posts: 339
Default

Very nice! It would be great if some of the larger UT groups would share linking into their redirects through something like this. We could effectively end the redirect problem forever.
__________________
Retired.
Reply With Quote
  #13  
Unread 21st March, 2012, 09:00 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Default

Also ... one other small question , how does this fair in regards to File Mismatches and such.. just browsing the code now , and am wondering if it first checks the version of FileX.xxx on the server against FileX.xxx on the Redirect before downloading ... or?.

Cheers.

Last edited by back4more : 21st March, 2012 at 09:03 PM.
Reply With Quote
  #14  
Unread 21st March, 2012, 09:31 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Cool Now Fully Functional.

Note: Made important Change , now works!
ok .. have done a quick info.txt and zipped it all up , hopefully this is the complete package with enough info to help anyone wishing to utilize this script;

info.txt
Quote:
UT99 Multi-Redirect Checker V1.0 {OCA}INSANEroba

Originally Posted by PizzaMan;
http://www.unrealadmin.org/forums/sh...834#post164834

This script allows the Admin of a server to utilize multiple redirect servers for clients to download files

from. If the file is not on sources[1] then it will proceed to check the next sources[x] in sequence and

retrieve files from there.

To add redirect URL's to script append to ;

$sources[0] = array('http://uz.gameservers.net','H');
$sources[1] = array('http://uz.ut-files.com','H');
$sources[2] = array('http://www.snakeservers-redirect.net','H');
$sources[3] = array('http://www.redirect_Server.com','X'); 'X' denotes [L]ocal, [H]ttp or [F]tp

for [F]tp un-comment ;
// $sources[X] = array('ftp://username:[email protected]/path_to_remote_dir','F');

and make changes as neccassary.

1. Make Changes above
2. Upload MultiRedir.php to your webserver
3. You may need to make a few changes to your .htaccess file below;
4. Make Changes to Unrealtournament.ini below;

UnrealTournament.ini;
RedirectToURL=http://www.redirect_server.com/

^Actual Path to MultiRedir Script also ending '/' is a must

You will also need a .htaccess file:

.htaccess

#---start---
Options +FollowSymlinks All -Indexes
order deny,allow
RewriteEngine on
RewriteRule ^(.*)\.uz$ MultiRedir.php?$1 [PT]
#----end----

^ create a file in the new directory named .htaccess
* copy and paste the code between the "#---start---" & "#---end---"
> and save to the same Directory as the MultiRedir.php file.

for example ;

www.myhost.com/ut
|- MultiRedir.php
|- .htaccess

small writeup by BFM.

Note: Atm does not contain fix for MisMatched Files

Gtr33tz/Thanks , {OCA}INSANEroba, PizzaMan, www.unrealadmin.org
Download MultiRedir.zip Mediafire.com

hopefully covered all the bases.

Last edited by back4more : 28th March, 2012 at 06:21 AM. Reason: updated... info.txt (ready for use)
Reply With Quote
  #15  
Unread 21st March, 2012, 10:00 PM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

The file name must be the same as the one in the .htaccess file.

And yes you are still fucked if there is a mismatch.
Reply With Quote
  #16  
Unread 21st March, 2012, 10:50 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Thumbs up

Quote:
Originally Posted by PizzaMan View Post
The file name must be the same as the one in the .htaccess file.

And yes you are still fucked if there is a mismatch.
Updated..

Last edited by back4more : 22nd March, 2012 at 05:18 AM.
Reply With Quote
  #17  
Unread 22nd March, 2012, 12:22 AM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Default

..maybe something like this could be used to fixed mismatches?..

http://stackoverflow.com/questions/7...for-comparison
Reply With Quote
  #18  
Unread 23rd March, 2012, 06:50 PM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Quote:
Originally Posted by back4more View Post
..maybe something like this could be used to fixed mismatches?..

http://stackoverflow.com/questions/7...for-comparison
But how would the script know the hash for the file that you want to download, or even the size? The UT server only requests the file by name. You can see it in-game when the download is finished before it reaches 100 % (where 100 % is the size of the uncompressed file).

You would need to write a mutator that does a quick CRC on the file on the UT server, and then talks to the script which in turn downloads each possible file to the web server, then uncompresses it, then performs a CRC on them all until it finds the correct file... and finally lets the client download it *pew*
Reply With Quote
  #19  
Unread 23rd March, 2012, 06:09 AM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

I suppose I could host this for everyone; I'd need a list of redirects willing to participate though.
__________________

UT-FILES.COM
Get your files
Reply With Quote
  #20  
Unread 23rd March, 2012, 06:09 PM
iloveut99 iloveut99 is offline
Unstoppable
 
Join Date: Oct 2010
Posts: 207
Default

That would be awesome skillz.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:08 AM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.