├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── clients ├── client-linux.py └── client-psutil.py ├── docker-compose.yml ├── plugin ├── Dockerfile-telegram ├── bot-telegram.py └── docker-compose-telegram.yml ├── server ├── .gitignore ├── Makefile ├── config.json ├── include │ ├── argparse.h │ ├── detect.h │ ├── json.h │ └── system.h ├── obj │ └── .gitignore └── src │ ├── argparse.c │ ├── exprtk.hpp │ ├── json.c │ ├── main.cpp │ ├── main.h │ ├── netban.cpp │ ├── netban.h │ ├── network.cpp │ ├── network.h │ ├── network_client.cpp │ ├── server.cpp │ ├── server.h │ └── system.c ├── service ├── status-client.service └── status-server.service ├── status.sh └── web ├── assets ├── favicon-65bd9f8a.png ├── index-282247e3.css └── index-e069a4f0.js ├── css ├── bootstrap.min.css ├── dark.css └── light.css ├── favicon.ico ├── image ├── flags │ ├── ac.svg │ ├── ad.svg │ ├── ae.svg │ ├── af.svg │ ├── ag.svg │ ├── ai.svg │ ├── al.svg │ ├── am.svg │ ├── ao.svg │ ├── aq.svg │ ├── ar.svg │ ├── as.svg │ ├── at.svg │ ├── au.svg │ ├── aw.svg │ ├── ax.svg │ ├── az.svg │ ├── ba.svg │ ├── bb.svg │ ├── bd.svg │ ├── be.svg │ ├── bf.svg │ ├── bg.svg │ ├── bh.svg │ ├── bi.svg │ ├── bj.svg │ ├── bl.svg │ ├── bm.svg │ ├── bn.svg │ ├── bo.svg │ ├── bq.svg │ ├── br.svg │ ├── bs.svg │ ├── bt.svg │ ├── bv.svg │ ├── bw.svg │ ├── by.svg │ ├── bz.svg │ ├── ca.svg │ ├── cc.svg │ ├── cd.svg │ ├── cefta.svg │ ├── cf.svg │ ├── cg.svg │ ├── ch.svg │ ├── ci.svg │ ├── ck.svg │ ├── cl.svg │ ├── cm.svg │ ├── cn.svg │ ├── co.svg │ ├── cp.svg │ ├── cr.svg │ ├── cu.svg │ ├── cv.svg │ ├── cw.svg │ ├── cx.svg │ ├── cy.svg │ ├── cz.svg │ ├── de.svg │ ├── dg.svg │ ├── dj.svg │ ├── dk.svg │ ├── dm.svg │ ├── do.svg │ ├── dz.svg │ ├── ea.svg │ ├── ec.svg │ ├── ee.svg │ ├── eg.svg │ ├── eh.svg │ ├── er.svg │ ├── es-ct.svg │ ├── es-ga.svg │ ├── es.svg │ ├── et.svg │ ├── eu.svg │ ├── fi.svg │ ├── fj.svg │ ├── fk.svg │ ├── fm.svg │ ├── fo.svg │ ├── fr.svg │ ├── ga.svg │ ├── gb-eng.svg │ ├── gb-nir.svg │ ├── gb-sct.svg │ ├── gb-wls.svg │ ├── gb.svg │ ├── gd.svg │ ├── ge.svg │ ├── gf.svg │ ├── gg.svg │ ├── gh.svg │ ├── gi.svg │ ├── gl.svg │ ├── gm.svg │ ├── gn.svg │ ├── gp.svg │ ├── gq.svg │ ├── gr.svg │ ├── gs.svg │ ├── gt.svg │ ├── gu.svg │ ├── gw.svg │ ├── gy.svg │ ├── hk.svg │ ├── hm.svg │ ├── hn.svg │ ├── hr.svg │ ├── ht.svg │ ├── hu.svg │ ├── ic.svg │ ├── id.svg │ ├── ie.svg │ ├── il.svg │ ├── im.svg │ ├── in.svg │ ├── io.svg │ ├── iq.svg │ ├── ir.svg │ ├── is.svg │ ├── it.svg │ ├── je.svg │ ├── jm.svg │ ├── jo.svg │ ├── jp.svg │ ├── ke.svg │ ├── kg.svg │ ├── kh.svg │ ├── ki.svg │ ├── km.svg │ ├── kn.svg │ ├── kp.svg │ ├── kr.svg │ ├── kw.svg │ ├── ky.svg │ ├── kz.svg │ ├── la.svg │ ├── lb.svg │ ├── lc.svg │ ├── li.svg │ ├── lk.svg │ ├── lr.svg │ ├── ls.svg │ ├── lt.svg │ ├── lu.svg │ ├── lv.svg │ ├── ly.svg │ ├── ma.svg │ ├── mc.svg │ ├── md.svg │ ├── me.svg │ ├── mf.svg │ ├── mg.svg │ ├── mh.svg │ ├── mk.svg │ ├── ml.svg │ ├── mm.svg │ ├── mn.svg │ ├── mo.svg │ ├── mp.svg │ ├── mq.svg │ ├── mr.svg │ ├── ms.svg │ ├── mt.svg │ ├── mu.svg │ ├── mv.svg │ ├── mw.svg │ ├── mx.svg │ ├── my.svg │ ├── mz.svg │ ├── na.svg │ ├── nc.svg │ ├── ne.svg │ ├── nf.svg │ ├── ng.svg │ ├── ni.svg │ ├── nl.svg │ ├── no.svg │ ├── np.svg │ ├── nr.svg │ ├── nu.svg │ ├── nz.svg │ ├── om.svg │ ├── pa.svg │ ├── pe.svg │ ├── pf.svg │ ├── pg.svg │ ├── ph.svg │ ├── pk.svg │ ├── pl.svg │ ├── pm.svg │ ├── pn.svg │ ├── pr.svg │ ├── ps.svg │ ├── pt.svg │ ├── pw.svg │ ├── py.svg │ ├── qa.svg │ ├── re.svg │ ├── ro.svg │ ├── rs.svg │ ├── ru.svg │ ├── rw.svg │ ├── sa.svg │ ├── sb.svg │ ├── sc.svg │ ├── sd.svg │ ├── se.svg │ ├── sg.svg │ ├── sh.svg │ ├── si.svg │ ├── sj.svg │ ├── sk.svg │ ├── sl.svg │ ├── sm.svg │ ├── sn.svg │ ├── so.svg │ ├── sr.svg │ ├── ss.svg │ ├── st.svg │ ├── sv.svg │ ├── sx.svg │ ├── sy.svg │ ├── sz.svg │ ├── ta.svg │ ├── tc.svg │ ├── td.svg │ ├── tf.svg │ ├── tg.svg │ ├── th.svg │ ├── tj.svg │ ├── tk.svg │ ├── tl.svg │ ├── tm.svg │ ├── tn.svg │ ├── to.svg │ ├── tr.svg │ ├── tt.svg │ ├── tv.svg │ ├── tw.svg │ ├── tz.svg │ ├── ua.svg │ ├── ug.svg │ ├── um.svg │ ├── un.svg │ ├── us.svg │ ├── uy.svg │ ├── uz.svg │ ├── va.svg │ ├── vc.svg │ ├── ve.svg │ ├── vg.svg │ ├── vi.svg │ ├── vn.svg │ ├── vu.svg │ ├── wf.svg │ ├── ws.svg │ ├── xk.svg │ ├── xx.svg │ ├── ye.svg │ ├── yt.svg │ ├── za.svg │ ├── zm.svg │ └── zw.svg └── os │ ├── android.svg │ ├── arch.svg │ ├── archlinux.svg │ ├── centos.svg │ ├── debian.svg │ ├── linux.svg │ ├── macos.svg │ ├── raspberry.svg │ ├── ubuntu.svg │ └── window.svg ├── img ├── dark.png └── light.png ├── index.html ├── index3.html ├── js ├── bootstrap.bundle.min.js └── serverstatus.js ├── json └── .gitignore └── ssview.py /.gitignore: -------------------------------------------------------------------------------- 1 | default.sublime-workspace 2 | 3 | # pycharm 4 | .idea 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # The Dockerfile for build localhost source, not git repo 2 | FROM debian:buster AS builder 3 | 4 | LABEL maintainer="cppla " 5 | 6 | RUN apt-get update -y && apt-get -y install gcc g++ make libcurl4-openssl-dev 7 | 8 | COPY . . 9 | 10 | WORKDIR /server 11 | 12 | RUN make -j 13 | RUN pwd && ls -a 14 | 15 | # glibc env run 16 | FROM nginx:latest 17 | 18 | RUN mkdir -p /ServerStatus/server/ && ln -sf /dev/null /var/log/nginx/access.log && ln -sf /dev/null /var/log/nginx/error.log 19 | 20 | COPY --from=builder server /ServerStatus/server/ 21 | COPY --from=builder web /usr/share/nginx/html/ 22 | 23 | # china time 24 | ENV TZ=Asia/Shanghai 25 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 26 | 27 | EXPOSE 80 35601 28 | HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)' 29 | CMD ["sh", "-c", "/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | serverstatus: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | image: serverstatus_server 8 | healthcheck: 9 | test: curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)' 10 | interval: 30s 11 | timeout: 10s 12 | retries: 5 13 | container_name: serverstatus 14 | restart: unless-stopped 15 | networks: 16 | serverstatus-network: 17 | ipv4_address: 172.23.0.2 18 | volumes: 19 | - ./server/config.json:/ServerStatus/server/config.json 20 | - ./web/json:/usr/share/nginx/html/json 21 | ports: 22 | - 35601:35601 23 | - 8080:80 24 | 25 | networks: 26 | serverstatus-network: 27 | ipam: 28 | config: 29 | - subnet: 172.23.0.0/24 30 | -------------------------------------------------------------------------------- /plugin/Dockerfile-telegram: -------------------------------------------------------------------------------- 1 | FROM python:alpine 2 | 3 | LABEL maintainer="lidalao" 4 | LABEL version="0.0.1" 5 | LABEL description="Telegram Bot for ServerStatus" 6 | 7 | WORKDIR /app 8 | RUN pip install requests 9 | COPY ./bot-telegram.py . 10 | CMD [ "python", "./bot-telegram.py" ] 11 | -------------------------------------------------------------------------------- /plugin/bot-telegram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # coding: utf-8 3 | # Create by : https://github.com/lidalao/ServerStatus 4 | # 版本:0.0.1, 支持Python版本:2.7 to 3.9 5 | # 支持操作系统: Linux, OSX, FreeBSD, OpenBSD and NetBSD, both 32-bit and 64-bit architectures 6 | 7 | import os 8 | import sys 9 | import requests 10 | import time 11 | import traceback 12 | 13 | NODE_STATUS_URL = 'http://serverstatus/json/stats.json' 14 | 15 | offs = [] 16 | counterOff = {} 17 | counterOn = {} 18 | 19 | def _send(text): 20 | chat_id = os.getenv('TG_CHAT_ID') 21 | bot_token = os.environ.get('TG_BOT_TOKEN') 22 | url = f"https://api.telegram.org/bot{bot_token}/sendMessage?parse_mode=HTML&disable_web_page_preview=true&chat_id=" + chat_id + "&text=" + text 23 | try: 24 | requests.get(url) 25 | except Exception as e: 26 | print("catch exception: ", traceback.format_exc()) 27 | 28 | def send2tg(srv, flag): 29 | if srv not in counterOff: 30 | counterOff[srv] = 0 31 | if srv not in counterOn: 32 | counterOn[srv] = 0 33 | 34 | if flag == 1 : # online 35 | if srv in offs: 36 | if counterOn[srv] < 10: 37 | counterOn[srv] += 1 38 | return 39 | #1. Remove srv from offs; 2. Send to tg: I am online 40 | offs.remove(srv) 41 | counterOn[srv] = 0 42 | text = 'Server Status' + '\n主机上线: ' + srv 43 | _send(text) 44 | else: #offline 45 | if srv not in offs: 46 | if counterOff[srv] < 10: 47 | counterOff[srv] += 1 48 | return 49 | #1. Append srv to offs; 2. Send to tg: I am offline 50 | offs.append(srv) 51 | counterOff[srv] = 0 52 | text = 'Server Status' + '\n主机下线: ' + srv 53 | _send(text) 54 | 55 | def sscmd(address): 56 | while True: 57 | r = requests.get(url=address, headers={"User-Agent": "ServerStatus/20211116"}) 58 | try: 59 | jsonR = r.json() 60 | except Exception as e: 61 | print('未发现任何节点') 62 | continue 63 | for i in jsonR["servers"]: 64 | if i["online4"] is False and i["online6"] is False: 65 | send2tg(i["name"], 0) 66 | else: 67 | send2tg(i["name"], 1) 68 | 69 | 70 | time.sleep(3) 71 | 72 | if __name__ == '__main__': 73 | sscmd(NODE_STATUS_URL) 74 | -------------------------------------------------------------------------------- /plugin/docker-compose-telegram.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | serverstatus: 4 | build: 5 | context: .. 6 | dockerfile: Dockerfile 7 | image: serverstatus_server 8 | container_name: serverstatus 9 | restart: unless-stopped 10 | networks: 11 | serverstatus-network: 12 | ipv4_address: 172.23.0.2 13 | volumes: 14 | - ../server/config.json:/ServerStatus/server/config.json 15 | - ../web/json:/usr/share/nginx/html/json 16 | ports: 17 | - 35601:35601 18 | - 8080:80 19 | bot: 20 | build: 21 | context: . 22 | dockerfile: Dockerfile-telegram 23 | image: serverstatus_bot 24 | container_name: bot4sss 25 | restart: unless-stopped 26 | networks: 27 | serverstatus-network: 28 | ipv4_address: 172.23.0.3 29 | environment: 30 | - TG_CHAT_ID=${TG_CHAT_ID} 31 | - TG_BOT_TOKEN=${TG_BOT_TOKEN} 32 | 33 | networks: 34 | serverstatus-network: 35 | name: serverstatus-network 36 | ipam: 37 | config: 38 | - subnet: 172.23.0.0/24 39 | -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | sergate 2 | .tags* 3 | -------------------------------------------------------------------------------- /server/Makefile: -------------------------------------------------------------------------------- 1 | OUT = sergate 2 | 3 | #CC = clang 4 | CC = gcc 5 | CFLAGS = -Wall -O2 6 | 7 | #CXX = clang++ 8 | CXX = g++ 9 | CXXFLAGS = -Wall -O2 -std=c++11 10 | 11 | ODIR = obj 12 | SDIR = src 13 | LIBS = -pthread -lm 14 | INC = -Iinclude 15 | 16 | C_SRCS := $(wildcard $(SDIR)/*.c) 17 | CXX_SRCS := $(wildcard $(SDIR)/*.cpp) 18 | C_OBJS := $(patsubst $(SDIR)/%.c,$(ODIR)/%.o,$(C_SRCS)) 19 | CXX_OBJS := $(patsubst $(SDIR)/%.cpp,$(ODIR)/%.o,$(CXX_SRCS)) 20 | OBJS := $(C_OBJS) $(CXX_OBJS) 21 | 22 | $(ODIR)/%.o: $(SDIR)/%.c 23 | $(CC) -c $(INC) $(CFLAGS) $< -o $@ 24 | 25 | $(ODIR)/%.o: $(SDIR)/%.cpp 26 | $(CXX) -c $(INC) $(CXXFLAGS) $< -o $@ 27 | 28 | $(OUT): $(OBJS) 29 | $(CXX) $(LIBS) $^ -o $(OUT) -lcurl 30 | 31 | .PHONY: clean 32 | 33 | clean: 34 | rm -f $(ODIR)/*.o $(OUT) 35 | -------------------------------------------------------------------------------- /server/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "servers": [ 3 | { 4 | "username": "s01", 5 | "name": "node1", 6 | "type": "xen", 7 | "host": "host1", 8 | "location": "🇨🇳", 9 | "password": "USER_DEFAULT_PASSWORD", 10 | "monthstart": 1 11 | }, 12 | { 13 | "username": "s02", 14 | "name": "node2", 15 | "type": "vmware", 16 | "host": "host2", 17 | "location": "🇯🇵", 18 | "password": "USER_DEFAULT_PASSWORD", 19 | "monthstart": 1 20 | }, 21 | { 22 | "disabled": true, 23 | "username": "s03", 24 | "name": "node3", 25 | "type": "hyper", 26 | "host": "host3", 27 | "location": "🇫🇷", 28 | "password": "USER_DEFAULT_PASSWORD", 29 | "monthstart": 1 30 | }, 31 | { 32 | "username": "s04", 33 | "name": "node4", 34 | "type": "kvm", 35 | "host": "host4", 36 | "location": "🇰🇷", 37 | "password": "USER_DEFAULT_PASSWORD", 38 | "monthstart": 1 39 | } 40 | ], 41 | "monitors": [ 42 | { 43 | "name": "baidu", 44 | "host": "https://www.baidu.com", 45 | "interval": 1200, 46 | "type": "https" 47 | }, 48 | { 49 | "name": "1111", 50 | "host": "1.1.1.1:80", 51 | "interval": 1200, 52 | "type": "tcp" 53 | } 54 | ], 55 | "watchdog": [ 56 | { 57 | "name": "cpu high warning,exclude username s01", 58 | "rule": "cpu>90&load_1>5&username!='s01'", 59 | "interval": 600, 60 | "callback": "https://yourSMSurl" 61 | }, 62 | { 63 | "name": "memory high warning, exclude less than 1GB vps", 64 | "rule": "(memory_used/memory_total)*100>90&memory_total>1048576", 65 | "interval": 300, 66 | "callback": "https://yourSMSurl" 67 | }, 68 | { 69 | "name": "offline warning", 70 | "rule": "online4=0&online6=0", 71 | "interval": 600, 72 | "callback": "https://yourSMSurl" 73 | }, 74 | { 75 | "name": "ddcc attack,limit type Oracle", 76 | "rule": "tcp_count>600&type='Oracle'", 77 | "interval": 300, 78 | "callback": "https://yourSMSurl" 79 | }, 80 | { 81 | "name": "month 999GB traffic warning", 82 | "rule": "(network_out-last_network_out)/1024/1024/1024>999", 83 | "interval": 3600, 84 | "callback": "https://yourSMSurl" 85 | }, 86 | { 87 | "name": "aliyun china free 18GB traffic warning", 88 | "rule": "(network_out-last_network_out)/1024/1024/1024>18&(username='aliyun1'|username='aliyun2')", 89 | "interval": 3600, 90 | "callback": "https://yourSMSurl" 91 | }, 92 | { 93 | "name": "packet loss rate warning", 94 | "rule": "(ping_10010>10|ping_189>10|ping_10086>10)&(host='sgp'|host='qqhk'|host='hk-21-x'|host='hk-31-x')", 95 | "interval": 3600, 96 | "callback": "https://yourSMSurl" 97 | }, 98 | { 99 | "name": "you can parse an expression combining any known field", 100 | "rule": "load_5>3", 101 | "interval": 900, 102 | "callback": "https://yourSMSurl" 103 | } 104 | ] 105 | } 106 | -------------------------------------------------------------------------------- /server/obj/.gitignore: -------------------------------------------------------------------------------- 1 | *.o -------------------------------------------------------------------------------- /server/src/network.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "netban.h" 3 | #include "network.h" 4 | 5 | bool CNetwork::Open(NETADDR BindAddr, CNetBan *pNetBan) 6 | { 7 | // zero out the whole structure 8 | mem_zero(this, sizeof(*this)); 9 | m_Socket.type = NETTYPE_INVALID; 10 | m_Socket.ipv4sock = -1; 11 | m_Socket.ipv6sock = -1; 12 | m_pNetBan = pNetBan; 13 | 14 | // open socket 15 | m_Socket = net_tcp_create(BindAddr); 16 | if(!m_Socket.type) 17 | return false; 18 | if(net_tcp_listen(m_Socket, NET_MAX_CLIENTS)) 19 | return false; 20 | net_set_non_blocking(m_Socket); 21 | 22 | for(int i = 0; i < NET_MAX_CLIENTS; i++) 23 | m_aSlots[i].m_Connection.Reset(); 24 | 25 | return true; 26 | } 27 | 28 | void CNetwork::SetCallbacks(NETFUNC_NEWCLIENT pfnNewClient, NETFUNC_DELCLIENT pfnDelClient, void *pUser) 29 | { 30 | m_pfnNewClient = pfnNewClient; 31 | m_pfnDelClient = pfnDelClient; 32 | m_UserPtr = pUser; 33 | } 34 | 35 | int CNetwork::Close() 36 | { 37 | for(int i = 0; i < NET_MAX_CLIENTS; i++) 38 | m_aSlots[i].m_Connection.Disconnect("Closing connection."); 39 | 40 | net_tcp_close(m_Socket); 41 | 42 | return 0; 43 | } 44 | 45 | int CNetwork::Drop(int ClientID, const char *pReason) 46 | { 47 | if(m_pfnDelClient) 48 | m_pfnDelClient(ClientID, pReason, m_UserPtr); 49 | 50 | m_aSlots[ClientID].m_Connection.Disconnect(pReason); 51 | 52 | return 0; 53 | } 54 | 55 | int CNetwork::AcceptClient(NETSOCKET Socket, const NETADDR *pAddr) 56 | { 57 | char aError[256] = { 0 }; 58 | int FreeSlot = -1; 59 | 60 | // look for free slot or multiple client 61 | for(int i = 0; i < NET_MAX_CLIENTS; i++) 62 | { 63 | if(FreeSlot == -1 && m_aSlots[i].m_Connection.State() == NET_CONNSTATE_OFFLINE) 64 | FreeSlot = i; 65 | if(m_aSlots[i].m_Connection.State() != NET_CONNSTATE_OFFLINE) 66 | { 67 | if(net_addr_comp(pAddr, m_aSlots[i].m_Connection.PeerAddress()) == 0) 68 | { 69 | str_copy(aError, "Only one client per IP allowed.", sizeof(aError)); 70 | break; 71 | } 72 | } 73 | } 74 | 75 | // accept client 76 | if(!aError[0] && FreeSlot != -1) 77 | { 78 | m_aSlots[FreeSlot].m_Connection.Init(Socket, pAddr); 79 | if(m_pfnNewClient) 80 | m_pfnNewClient(FreeSlot, m_UserPtr); 81 | return 0; 82 | } 83 | 84 | // reject client 85 | if(!aError[0]) 86 | str_copy(aError, "No free slot available.", sizeof(aError)); 87 | 88 | net_tcp_send(Socket, aError, str_length(aError)); 89 | net_tcp_close(Socket); 90 | 91 | return -1; 92 | } 93 | 94 | int CNetwork::Update() 95 | { 96 | NETSOCKET Socket; 97 | NETADDR Addr; 98 | 99 | if(net_tcp_accept(m_Socket, &Socket, &Addr) > 0) 100 | { 101 | // check if we should just drop the packet 102 | char aBuf[128]; 103 | if(NetBan() && NetBan()->IsBanned(&Addr, aBuf, sizeof(aBuf))) 104 | { 105 | // banned, reply with a message and drop 106 | net_tcp_send(Socket, aBuf, str_length(aBuf)); 107 | net_tcp_close(Socket); 108 | } 109 | else 110 | AcceptClient(Socket, &Addr); 111 | } 112 | 113 | for(int i = 0; i < NET_MAX_CLIENTS; i++) 114 | { 115 | if(m_aSlots[i].m_Connection.State() == NET_CONNSTATE_ONLINE) 116 | m_aSlots[i].m_Connection.Update(); 117 | if(m_aSlots[i].m_Connection.State() == NET_CONNSTATE_ERROR) 118 | Drop(i, m_aSlots[i].m_Connection.ErrorString()); 119 | } 120 | 121 | return 0; 122 | } 123 | 124 | int CNetwork::Recv(char *pLine, int MaxLength, int *pClientID) 125 | { 126 | for(int i = 0; i < NET_MAX_CLIENTS; i++) 127 | { 128 | if(m_aSlots[i].m_Connection.State() == NET_CONNSTATE_ONLINE && m_aSlots[i].m_Connection.Recv(pLine, MaxLength)) 129 | { 130 | if(pClientID) 131 | *pClientID = i; 132 | return 1; 133 | } 134 | } 135 | return 0; 136 | } 137 | 138 | int CNetwork::Send(int ClientID, const char *pLine) 139 | { 140 | if(m_aSlots[ClientID].m_Connection.State() == NET_CONNSTATE_ONLINE) 141 | return m_aSlots[ClientID].m_Connection.Send(pLine); 142 | else 143 | return -1; 144 | } 145 | -------------------------------------------------------------------------------- /server/src/network.h: -------------------------------------------------------------------------------- 1 | #ifndef NETWORK_H 2 | #define NETWORK_H 3 | 4 | enum 5 | { 6 | NET_CONNSTATE_OFFLINE=0, 7 | NET_CONNSTATE_CONNECT=1, 8 | NET_CONNSTATE_PENDING=2, 9 | NET_CONNSTATE_ONLINE=3, 10 | NET_CONNSTATE_ERROR=4, 11 | 12 | NET_MAX_PACKETSIZE = 1400, 13 | NET_MAX_CLIENTS = 512 14 | }; 15 | 16 | typedef int (*NETFUNC_DELCLIENT)(int ClientID, const char* pReason, void *pUser); 17 | typedef int (*NETFUNC_NEWCLIENT)(int ClientID, void *pUser); 18 | 19 | class CNetworkClient 20 | { 21 | private: 22 | int m_State; 23 | 24 | NETADDR m_PeerAddr; 25 | NETSOCKET m_Socket; 26 | 27 | char m_aBuffer[NET_MAX_PACKETSIZE]; 28 | int m_BufferOffset; 29 | 30 | char m_aErrorString[256]; 31 | 32 | bool m_LineEndingDetected; 33 | char m_aLineEnding[3]; 34 | 35 | public: 36 | void Init(NETSOCKET Socket, const NETADDR *pAddr); 37 | void Disconnect(const char *pReason); 38 | 39 | int State() const { return m_State; } 40 | const NETADDR *PeerAddress() const { return &m_PeerAddr; } 41 | const char *ErrorString() const { return m_aErrorString; } 42 | 43 | void Reset(); 44 | int Update(); 45 | int Send(const char *pLine); 46 | int Recv(char *pLine, int MaxLength); 47 | }; 48 | 49 | class CNetwork 50 | { 51 | private: 52 | struct CSlot 53 | { 54 | CNetworkClient m_Connection; 55 | }; 56 | 57 | NETSOCKET m_Socket; 58 | class CNetBan *m_pNetBan; 59 | CSlot m_aSlots[NET_MAX_CLIENTS]; 60 | 61 | NETFUNC_NEWCLIENT m_pfnNewClient; 62 | NETFUNC_DELCLIENT m_pfnDelClient; 63 | void *m_UserPtr; 64 | 65 | public: 66 | void SetCallbacks(NETFUNC_NEWCLIENT pfnNewClient, NETFUNC_DELCLIENT pfnDelClient, void *pUser); 67 | 68 | // 69 | bool Open(NETADDR BindAddr, CNetBan *pNetBan); 70 | int Close(); 71 | 72 | // 73 | int Recv(char *pLine, int MaxLength, int *pClientID = 0); 74 | int Send(int ClientID, const char *pLine); 75 | int Update(); 76 | 77 | // 78 | int AcceptClient(NETSOCKET Socket, const NETADDR *pAddr); 79 | int Drop(int ClientID, const char *pReason); 80 | 81 | // status requests 82 | const NETADDR *ClientAddr(int ClientID) const { return m_aSlots[ClientID].m_Connection.PeerAddress(); } 83 | const NETSOCKET *Socket() const { return &m_Socket; } 84 | class CNetBan *NetBan() const { return m_pNetBan; } 85 | }; 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /server/src/server.h: -------------------------------------------------------------------------------- 1 | #ifndef SERVER_H 2 | #define SERVER_H 3 | 4 | #include "netban.h" 5 | #include "network.h" 6 | 7 | class CServer 8 | { 9 | class CClient 10 | { 11 | public: 12 | enum 13 | { 14 | STATE_EMPTY=0, 15 | STATE_CONNECTED, 16 | STATE_AUTHED, 17 | }; 18 | 19 | int m_State; 20 | int64 m_TimeConnected; 21 | int64 m_LastReceived; 22 | }; 23 | CClient m_aClients[NET_MAX_CLIENTS]; 24 | 25 | CNetwork m_Network; 26 | CNetBan m_NetBan; 27 | 28 | class CMain *m_pMain; 29 | 30 | bool m_Ready; 31 | 32 | static int NewClientCallback(int ClientID, void *pUser); 33 | static int DelClientCallback(int ClientID, const char *pReason, void *pUser); 34 | 35 | public: 36 | int Init(CMain *pMain, const char *Bind, int Port); 37 | void Update(); 38 | void Send(int ClientID, const char *pLine); 39 | void Shutdown(); 40 | 41 | CNetwork *Network() { return &m_Network; } 42 | CNetBan *NetBan() { return &m_NetBan; } 43 | CMain *Main() { return m_pMain; } 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /service/status-client.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=ServerStatus-Client 3 | After=network.target 4 | [Service] 5 | ExecStart=/usr/bin/python3 /usr/local/ServerStatus/clients/client-linux.py 6 | ExecReload=/bin/kill -HUP $MAINPID 7 | Restart=on-failure 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /service/status-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=ServerStatus-Server 3 | After=network.target 4 | [Service] 5 | ExecStart=/usr/local/ServerStatus/server/sergate --config=/usr/local/ServerStatus/server/config.json --web-dir=/usr/local/ServerStatus/web 6 | ExecReload=/bin/kill -HUP $MAINPID 7 | Restart=on-failure 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /web/assets/favicon-65bd9f8a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppla/ServerStatus/830938eac9a7145d78f079f8706acc6bcbb7873b/web/assets/favicon-65bd9f8a.png -------------------------------------------------------------------------------- /web/css/light.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #ebebeb url('../img/light.png') repeat; 3 | font-size: 15px; 4 | padding-top: 70px; 5 | padding-bottom: 30px; 6 | } 7 | 8 | .navbar { 9 | min-height: 40px; 10 | background-color: #333; 11 | } 12 | 13 | .navbar-brand { 14 | color: #fff; 15 | padding: 10px; 16 | font-size: 20px; 17 | } 18 | 19 | .dropdown .dropdown-toggle { 20 | padding-bottom: 10px; 21 | padding-top: 10px; 22 | } 23 | 24 | .navbar-inverse .navbar-brand { 25 | color: #fff; 26 | padding: 10px; 27 | font-size: 20px; 28 | } 29 | 30 | .content { 31 | background: #ffffff; 32 | padding: 20px; 33 | border-radius: 5px; 34 | border: 1px solid #cecece; 35 | box-shadow: 0 1px 10px rgba(0, 0, 0, .1); 36 | margin-bottom: 20px; 37 | } 38 | 39 | .table { 40 | background: #ffffff; 41 | margin-bottom: 0; 42 | border-collapse: collapse; 43 | border-radius: 3px; 44 | width: 100%; 45 | } 46 | 47 | .table th, .table td { 48 | text-align: center; 49 | padding: 8px; 50 | } 51 | 52 | .table-striped tbody tr:nth-child(even) { 53 | background-color: #F9F9F9; 54 | } 55 | 56 | .table-striped tbody tr:nth-child(odd) { 57 | background-color: #FFF; 58 | } 59 | 60 | .progress { 61 | margin-bottom: 0; 62 | } 63 | 64 | .progress-bar { 65 | color: #000; 66 | overflow: visible; 67 | } 68 | 69 | .table-hover tbody tr:hover td { 70 | background: #E6E6E6; 71 | } 72 | 73 | tr.even.expandRow:hover { 74 | background: #F9F9F9 !important; 75 | } 76 | 77 | tr.odd.expandRow:hover { 78 | background: #FFF !important; 79 | } 80 | 81 | .expandRow td { 82 | padding: 0 !important; 83 | border-top: 0 !important; 84 | } 85 | 86 | #month_traffic { 87 | min-width: 85px; 88 | max-width: 95px; 89 | } 90 | 91 | #traffic, #network { 92 | width: 170px; 93 | } 94 | 95 | #cpu, #ram, #hdd { 96 | min-width: 45px; 97 | max-width: 68px; 98 | } 99 | 100 | #ping { 101 | width: 115px; 102 | } 103 | 104 | @media only screen and (max-width: 1200px) { 105 | body { 106 | font-size: 10px; 107 | } 108 | 109 | .content { 110 | padding: 0; 111 | } 112 | #traffic, #network { 113 | width: 120px; 114 | } 115 | #type, #location, #uptime, #ping { 116 | display: none; 117 | visibility: hidden; 118 | } 119 | } 120 | 121 | @media only screen and (max-width: 720px) { 122 | body { 123 | font-size: 10px; 124 | } 125 | 126 | .content { 127 | padding: 0; 128 | } 129 | #traffic, #network { 130 | width: 120px; 131 | } 132 | #month_traffic, #type, #location, #uptime, #ping { 133 | display: none; 134 | visibility: hidden; 135 | } 136 | } 137 | 138 | @media only screen and (max-width: 620px) { 139 | body { 140 | font-size: 10px; 141 | } 142 | 143 | .content { 144 | padding: 0; 145 | } 146 | #network { 147 | width: 120px; 148 | } 149 | #month_traffic, #type, #location, #uptime, #traffic, #ping { 150 | display: none; 151 | visibility: hidden; 152 | } 153 | } 154 | 155 | .navbar-nav .nav-link { 156 | padding-top: 0.5rem; 157 | padding-bottom: 0.5rem; 158 | line-height: 1.5; 159 | } 160 | 161 | .navbar-nav .dropdown-toggle::after { 162 | vertical-align: 0.15em; 163 | } 164 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppla/ServerStatus/830938eac9a7145d78f079f8706acc6bcbb7873b/web/favicon.ico -------------------------------------------------------------------------------- /web/image/flags/ae.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/ag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/al.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/am.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/ao.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/aq.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/ar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /web/image/flags/at.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/au.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/ax.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/image/flags/az.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/ba.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/bb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/bd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/be.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/bf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/bh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/bi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/bj.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/bl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/bq.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/bs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/bv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/bw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ca.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/cc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/image/flags/cd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/cefta.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/cf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/cg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/ch.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/ci.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ck.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/cl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/cm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/cn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/co.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/cp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/cr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/cu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/cv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/cw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/cx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/cz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/de.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/dj.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/dk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/dz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/ee.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/eh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/er.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/es-ct.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/et.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/eu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /web/image/flags/fi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/fm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/fo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/fr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ga.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/gb-eng.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/gb-sct.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/gb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/gd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /web/image/flags/ge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/gf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/gg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/gh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/gi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /web/image/flags/gl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/gm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/gn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/gp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/gr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/gw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/gy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/hk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /web/image/flags/hm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/hn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/image/flags/hu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/id.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/ie.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/il.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /web/image/flags/iq.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/image/flags/is.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/it.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/jm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/jo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/jp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/ke.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/image/flags/kg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/km.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/kn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/kp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/kr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /web/image/flags/kw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/la.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/lb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/lc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/lr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/ls.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/lt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/lu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/lv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/ly.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/ma.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/mc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/mf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/ml.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/mn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/mo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/mq.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/mu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/mv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/mw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/image/flags/my.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/mz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/image/flags/na.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/nc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/ne.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/ng.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/nl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/np.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/nr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /web/image/flags/nu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/image/flags/nz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /web/image/flags/pa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/pg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/ph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/pk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/pl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/pm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/pr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/ps.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/pw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/qa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/re.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ro.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ru.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/rw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/sb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/sc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/sd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/se.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/sg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/si.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/image/flags/sj.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/sk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/sl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/sn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/so.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/sr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/ss.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/st.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/image/flags/sy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/td.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/tf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /web/image/flags/tg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /web/image/flags/th.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/tj.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /web/image/flags/tk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/tl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/tn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/to.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/image/flags/tr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/tt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /web/image/flags/tv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web/image/flags/tw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /web/image/flags/tz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /web/image/flags/ua.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/image/flags/ug.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /web/image/flags/uy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /web/image/flags/uz.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /web/image/flags/vc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /web/image/flags/ve.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /web/image/flags/vn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /web/image/flags/vu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/image/flags/wf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/ws.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/xx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /web/image/flags/ye.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/yt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /web/image/flags/za.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/image/os/android.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/image/os/arch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/image/os/archlinux.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/image/os/macos.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/image/os/ubuntu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/image/os/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/img/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppla/ServerStatus/830938eac9a7145d78f079f8706acc6bcbb7873b/web/img/dark.png -------------------------------------------------------------------------------- /web/img/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppla/ServerStatus/830938eac9a7145d78f079f8706acc6bcbb7873b/web/img/light.png -------------------------------------------------------------------------------- /web/index3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ServerStatus 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

16 | Light Default 17 |

18 |
19 |
20 | Powered by ServerStatus中文版. 22 | Theme Light by OriLight 24 |
25 |
26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /web/json/.gitignore: -------------------------------------------------------------------------------- 1 | stats.json 2 | stats.json~ -------------------------------------------------------------------------------- /web/ssview.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # coding: utf-8 3 | # Update by : https://github.com/cppla/ServerStatus, Update date: 20211009 4 | # 支持Python版本:2.7 to 3.9; requirements.txt: requests, PrettyTable 5 | # 主要是为了受到CC attack时候方便查看机器状态 6 | 7 | import os 8 | import sys 9 | import requests 10 | import time 11 | from prettytable import PrettyTable 12 | 13 | scroll = True 14 | clear = lambda: os.system('clear' if 'linux' in sys.platform or 'darwin' in sys.platform else 'cls') 15 | 16 | 17 | def sscmd(address): 18 | while True: 19 | r = requests.get( 20 | url=address, 21 | headers={ 22 | "User-Agent": "ServerStatus/20181203", 23 | } 24 | ) 25 | jsonR = r.json() 26 | 27 | ss = PrettyTable( 28 | [ 29 | "月流量 ↓|↑", 30 | "节点名", 31 | "位置", 32 | "在线时间", 33 | "负载", 34 | "网络 ↓|↑", 35 | "总流量 ↓|↑", 36 | "处理器", 37 | "内存", 38 | "硬盘" 39 | ], 40 | ) 41 | for i in jsonR["servers"]: 42 | if i["online4"] is False and i["online6"] is False: 43 | ss.add_row( 44 | [ 45 | '0.00G', 46 | "%s" % i["name"], 47 | "%s" % i["location"], 48 | '-', 49 | '-', 50 | '-', 51 | '-', 52 | '-', 53 | '-', 54 | '-', 55 | ] 56 | ) 57 | else: 58 | ss.add_row( 59 | [ 60 | "%.2fG|%.2fG" % (float(i["last_network_in"]) / 1024 / 1024 / 1024, float(i["last_network_out"]) / 1024 / 1024 / 1024), 61 | "%s" % i["name"], 62 | # "%s" % i["type"], 63 | "%s" % i["location"], 64 | "%s" % i["uptime"], 65 | "%s" % (i["load_1"]), 66 | "%.2fM|%.2fM" % (float(i["network_rx"]) / 1000 / 1000, float(i["network_tx"]) / 1000 / 1000), 67 | "%.2fG|%.2fG" % ( 68 | float(i["network_in"]) / 1024 / 1024 / 1024, float(i["network_out"]) / 1024 / 1024 / 1024), 69 | "%d%%" % (i["cpu"]), 70 | "%d%%" % (float(i["memory_used"]) / i["memory_total"] * 100), 71 | "%d%%" % (float(i["hdd_used"]) / i["hdd_total"] * 100), 72 | ] 73 | ) 74 | if scroll is True: 75 | clear() 76 | print(ss) 77 | time.sleep(1) 78 | 79 | 80 | if __name__ == '__main__': 81 | default = 'https://tz.cloudcpp.com/json/stats.json' 82 | ads = sys.argv[1] if len(sys.argv) == 2 else default 83 | sscmd(ads) 84 | --------------------------------------------------------------------------------