Skocz do zawartości

[Pytanie]Serwerinfo.py


Rekomendowane odpowiedzi

Witam na dole podaje plik serwerinfo.py z clienta i mam pytanie niżej są IP, ale wszędziej prawie jest "83.16.56.212" a na samym dole "210.123.10.153" I moje pytanie to dlaczego na samym dole jest inne niż pozostałe ? I czy jak zmienie wszystkie IP na swoje z hamachi z końcówką .100 to będzie działało czy muszę coś jeszcze zmieniać ?

 

import locale
def BuildServerList(orderList):
   retMarkAddrDict = {}
   retAuthAddrDict = {}
   retRegion0 = {}

   ridx = 1
   for region, auth, mark, channels in orderList:
       cidx = 1
       channelDict = {}
       for channel in channels:
           key = ridx * 10 + cidx
           channel['key'] = key
           channelDict[cidx] = channel
           cidx += 1

       region['channel'] = channelDict

       retRegion0[ridx] = region
       retAuthAddrDict[ridx] = auth
       retMarkAddrDict[ridx*10] = mark
       ridx += 1

   return retRegion0, retAuthAddrDict, retMarkAddrDict
if locale.IsEUROPE():
   STATE_NONE = ' '

   STATE_DICT = {
       0 : '  ',
       1 : '   ',
       2 : '    ',
       3 : '	 ',
   }

   CHANNELS1 = [
       {'name':'Handel','ip':'83.16.56.212','tcp_port':13000,'udp_port':13000,'state':STATE_NONE,},
       {'name':'Exp','ip':'83.16.56.212','tcp_port':13001,'udp_port':13001,'state':STATE_NONE,},
   ]
   MARK1 = { 'ip' : '83.16.56.212', 'tcp_port' : 13000, 'mark' : '120.tga', 'symbol_path' : '120', }
   AUTH1 = {'ip':'83.16.56.212','port':18001, }
   NAME1 = { 'name' : 'PanghihinayangMt2'}
   REGION0_ORDER_LIST = [
       (NAME1, AUTH1, MARK1, CHANNELS1),
   ]
   NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)
   # RESULT
   NEW_REGION_NAME_DICT = {0 : 'POLAND',}
   NEW_REGION_AUTH_SERVER_DICT = {0 : NEW_REGION0_AUTH_SERVER_DICT,}
   NEW_REGION_DICT = {0 : NEW_REGION0,}

   MARKADDR_DICT = NEW_MARKADDR_DICT
   REGION_DICT = NEW_REGION_DICT
   REGION_NAME_DICT = NEW_REGION_NAME_DICT
   REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT

   TESTADDR = { 'ip' : '210.123.10.153', 'tcp_port' : 50000, 'udp_port' : 50000, }

2863366318.png

Odnośnik do komentarza

Prosze bardzo

 

 

import locale
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
 cidx = 1
 channelDict = {}
 for channel in channels:
  key = ridx * 10 + cidx
  channel['key'] = key
  channelDict[cidx] = channel
  cidx += 1
 region['channel'] = channelDict
 retRegion0[ridx] = region
 retAuthAddrDict[ridx] = auth
 retMarkAddrDict[ridx*10] = mark
 ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
if locale.IsEUROPE():
STATE_NONE = ' '
STATE_DICT = {
 0 : '...',
 1 : '...',
 2 : '... ',
 3 : '...  ',
}
CHANNELS1 = [
 {'name':'CH 1','ip':'83.16.56.212','tcp_port':13000,'udp_port':13000,'state':STATE_NONE,},
 {'name':'CH 2','ip':'83.16.56.212','tcp_port':13001,'udp_port':13001,'state':STATE_NONE,},
]
MARK1 = { 'ip' : '83.16.56.212', 'tcp_port' : 13000, 'mark' : '120.tga', 'symbol_path' : '120', }
AUTH1 = {'ip':'83.16.56.212','port':18001, }
NAME1 = { 'name' : 'PanghihinayangMt2'}
REGION0_ORDER_LIST = [
 (NAME1, AUTH1, MARK1, CHANNELS1),
]
NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)
# RESULT
NEW_REGION_NAME_DICT = {0 : 'POLAND',}
NEW_REGION_AUTH_SERVER_DICT = {0 : NEW_REGION0_AUTH_SERVER_DICT,}
NEW_REGION_DICT = {0 : NEW_REGION0,}
MARKADDR_DICT = NEW_MARKADDR_DICT
REGION_DICT = NEW_REGION_DICT
REGION_NAME_DICT = NEW_REGION_NAME_DICT
REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT
TESTADDR = { 'ip' : '83.16.56.212', 'tcp_port' : 50000, 'udp_port' : 50000, }

 

 

 

Ps.

 

Jezeli nadal nie dziala to na 90% wina plikow :)

*nie wpisuj komendy /etc/rc.d/netif restart

 

czyli bedzie to wygladalo tak

 

login: root

haslo: Twoje haslo

 

/start

 

wybuierasz ile ch wlaczyc (1)

 

Igotowe powinno dziala

 

*Odbpoluj w port mapie port 18001 :)

Odnośnik do komentarza

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

  • Ostatnio przeglądający forum [Pytanie]Serwerinfo.py   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...