From 6e41268b56eb6bbc5b51993790bc0b5d341ee942 Mon Sep 17 00:00:00 2001 From: mihaiitdata Date: Fri, 13 Feb 2026 00:46:21 +0200 Subject: [PATCH] =?UTF-8?q?Actualizeaz=C4=83=20configurare=20cu=20model=20?= =?UTF-8?q?profesional=20bazat=20pe=20node-ase.ovh=20cu=20suport=20complet?= =?UTF-8?q?=20pentru=20underchat.org?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configure-interactive.sh | 219 +++++++++++++++++++-------- install.sh | 318 ++++++++++++++++++++++++++++----------- 2 files changed, 392 insertions(+), 145 deletions(-) diff --git a/configure-interactive.sh b/configure-interactive.sh index bad5360..51236d9 100755 --- a/configure-interactive.sh +++ b/configure-interactive.sh @@ -104,21 +104,29 @@ configure_general() { log_section "Setări de bază ale serverului" + # Domeniu rețea + NETWORK=$(read_input "Domeniu/Rețea (ex: underchat.org)" "underchat.org") + log_ok "Domeniu rețea: $NETWORK" + # Nume server while true; do - SERVER_NAME=$(read_input "Nume server (FQDN)" "localhost.localdomain") + SERVER_NAME=$(read_input "Nume server (ex: ns1.${NETWORK})" "ns1.${NETWORK}") if validate_hostname "$SERVER_NAME"; then log_ok "Nume server valid: $SERVER_NAME" break else - log_err "Nume server invalid! Folosește format FQDN (ex: irc.example.com)" + log_err "Nume server invalid! Folosește format FQDN (ex: ns1.example.com)" fi done # Descriere - SERVER_DESC=$(read_input "Descriere server" "Nefarious IRCd Server") + SERVER_DESC=$(read_input "Descriere server" "The ${NETWORK} Network") log_ok "Descriere: $SERVER_DESC" + # Virtual host (IP local) + VHOST=$(read_input "Virtual Host / IP local" "127.0.0.1") + log_ok "Virtual Host: $VHOST" + # Numeric while true; do NUMERIC=$(read_input "Numeric server (0-4095)" "1") @@ -208,15 +216,15 @@ configure_classes() { configure_operators() { log_title "CONFIGURARE OPERATORI" - log_section "Prim operator" + log_section "Configurare Operator Principal" - OPER_NICK=$(read_input "Nick operator" "root") - log_ok "Nick: $OPER_NICK" + OPER_NAME=$(read_input "Nume operator" "AdminRoot") + log_ok "Nume: $OPER_NAME" log_info "Pentru a genera parola, rulează:" echo -e "${CYAN} $PREFIX/bin/umkpasswd${NC}" - OPER_PASS=$(read_input "Hash bcrypt parola operator" "") + OPER_PASS=$(read_input "Hash parola operator (SMD5/bcrypt)" "") if [ -z "$OPER_PASS" ]; then log_err "Parola necesară! Generează cu umkpasswd" @@ -224,8 +232,13 @@ configure_operators() { log_info "Se folosește parola implicită pentru testing" fi - OPER_HOST=$(read_input "Host permis pentru operator" "127.0.0.1") + OPER_HOST=$(read_input "Host permis pentru operator" "*@*") log_ok "Host: $OPER_HOST" + + # Oper options + read -p "Is this an admin operator? (y/n) [y]: " -n 1 IS_ADMIN + IS_ADMIN=${IS_ADMIN:-y} + echo "" } # Etapa 6: Setări avansate @@ -263,12 +276,14 @@ generate_config_file() { AUTH_FEATURE=$([ "$AUTH_ENABLED" = "y" ] && echo "yes" || echo "no") PERSIST_FEATURE=$([ "$PERSIST_CHANS" = "y" ] && echo "yes" || echo "no") SWHOIS_FEATURE=$([ "$SWHOIS_ENABLED" = "y" ] && echo "yes" || echo "no") + IS_ADMIN_OPER=$([ "$IS_ADMIN" = "y" ] && echo "yes" || echo "no") cat > "$CONFIG_FILE" << EOFCONFIG # ============================================================================ # Fișier de configurare Nefarious IRCd # Generat automat la: $(date) -# Script: configure.sh +# Script: configure-interactive.sh +# Model: Professional IRC Server # ============================================================================ # ============================================================================ @@ -276,90 +291,174 @@ generate_config_file() { # ============================================================================ General { name = "$SERVER_NAME"; + vhost = "127.0.0.1"; description = "$SERVER_DESC"; numeric = $NUMERIC; - logfile = "$PREFIX/log/ircd.log"; - motd = "$PREFIX/etc/ircd.motd"; - opermotd = "$PREFIX/etc/ircd.opermotd"; + dns server = "8.8.8.8"; + dns server = "1.1.1.1"; }; # ============================================================================ # SECȚIUNE: ADMIN # ============================================================================ Admin { - location = "$ADMIN_LOCATION"; - contact = "$ADMIN_EMAIL"; - contact = "$ADMIN_INFO"; + Location = "The $SERVER_NAME World"; + Location = "$ADMIN_LOCATION"; + Contact = "$ADMIN_EMAIL"; + Contact = "$ADMIN_INFO"; }; # ============================================================================ -# SECȚIUNE: PORTURI +# SECȚIUNE: CLASE DE CONEXIUNI # ============================================================================ -# Port standard pentru clienți -Port { - port = $PORT1; - mask = 0.0.0.0; -}; -# Port SSL/TLS -Port { - port = $PORT2; - mask = 0.0.0.0; - tls = yes; -}; - -# Port server-to-server -Port { - port = $SERVER_PORT; - mask = 0.0.0.0; -}; - -# ============================================================================ -# SECȚIUNE: CLASE -# ============================================================================ Class { - name = "clients"; - pingfreq = $PINGFREQ; - connectfreq = 60; - maxlinks = $MAXLINKS; + name = "Server"; + pingfreq = 1 minutes 30 seconds; + connectfreq = 5 minutes; + maxlinks = 1; + sendq = 9000000; +}; + +Class { + name = "Local"; + pingfreq = $PINGFREQ seconds; sendq = $SENDQ; + maxlinks = $MAXLINKS; + usermode = "+iw"; }; Class { - name = "servers"; - pingfreq = 60; - connectfreq = 300; - maxlinks = 10; - sendq = 1000000; + name = "Other"; + pingfreq = $PINGFREQ seconds; + sendq = $SENDQ; + maxlinks = $MAXLINKS; + usermode = "+ix"; +}; + +Class { + name = "Opers"; + pingfreq = $PINGFREQ seconds; + sendq = $SENDQ; + maxlinks = 20; + local = no; + freeform = yes; + mode_lchan = yes; + deop_lchan = yes; + walk_lchan = yes; + show_invis = yes; + see_chan = yes; + list_chan = yes; + usermode = "+W"; + remove = yes; }; # ============================================================================ # SECȚIUNE: CLIENT # ============================================================================ Client { - class = "clients"; + host = "*@*"; + ip = "*@*"; + class = "Other"; maxlinks = $MAXLINKS; }; # ============================================================================ -# SECȚIUNE: OPERATOR +# SECȚIUNE: PORTURI # ============================================================================ -Operator { - nick = "$OPER_NICK"; - password = "$OPER_PASS"; - privileges = "+all"; - host = "$OPER_HOST"; + +# Port server-to-server +Port { + vhost = "127.0.0.1" $SERVER_PORT; + server = yes; + hidden = yes; +}; + +# Port standard pentru clienți +Port { + vhost = "127.0.0.1" $PORT1; + hidden = yes; +}; + +# Port SSL/TLS pentru clienți +Port { + vhost = "127.0.0.1" $PORT2; + ssl = yes; + hidden = yes; }; # ============================================================================ -# SECȚIUNE: CARACTERISTICI (Features) +# SECȚIUNE: OPERATORI # ============================================================================ -Feature { - AUTH = "$AUTH_FEATURE"; - PERSIST_CHANS = "$PERSIST_FEATURE"; - IDLETIME = $IDLETIME; - SWHOIS = "$SWHOIS_FEATURE"; - LOG_FACILITY = "LOG_USER"; + +Operator { + name = "$OPER_NAME"; + password = "$OPER_PASS"; + host = "$OPER_HOST"; + class = "Opers"; + admin = $IS_ADMIN_OPER; + hide_oper = no; + hide_channels = no; +}; + +# ============================================================================ +# SECȚIUNE: JUPE - Nick-uri rezervate +# ============================================================================ + +Jupe { + nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; + nick = "StatServ,NoteServ"; + nick = "ChanServ,ChanSaver"; + nick = "NickServ,NickSaver"; +}; + +# ============================================================================ +# SECȚIUNE: FEATURE - Caracteristici +# ============================================================================ + +features { + "NETWORK" = "UnderchatNetwork"; + "DOMAINNAME" = "$SERVER_NAME"; + + "LOG" = "SYSTEM" "FILE" "$PREFIX/log/ircd.log"; + "LOG" = "SYSTEM" "LEVEL" "CRIT"; + + "HUB" = "TRUE"; + "RELIABLE_CLOCK" = "FALSE"; + "WALLOPS_OPER_ONLY" = "TRUE"; + "NODNS" = "FALSE"; + + "CLIENT_FLOOD" = "1024"; + "BUFFERPOOL" = "27000000"; + + "HOST_HIDING" = "TRUE"; + "HIDDEN_HOST" = "users.underchat.org"; + "HIDDEN_IP" = "127.0.0.1"; + + "MAXCHANNELSPERUSER" = "60"; + "CHANNELLEN" = "200"; + "MAXBANS" = "50"; + + "NICKLEN" = "12"; + "NICKNAMEHISTORYLENGTH" = "800"; + + "HANGONGOODLINK" = "300"; + "HANGONRETRYDELAY" = "10"; + "CONNECTTIMEOUT" = "90"; + "PINGFREQUENCY" = "$PINGFREQ"; + "CONNECTFREQUENCY" = "600"; + + "MPATH" = "$PREFIX/etc/ircd.motd"; + "PPATH" = "$PREFIX/var/ircd.pid"; + + "HIS_SERVERNAME" = "*.underchat.org"; + "HIS_SERVERINFO" = "The UnderchatNetwork World"; + + "CHECK" = "TRUE"; + "SETHOST" = "TRUE"; + "NETWORK_REHASH" = "TRUE"; + + "HALFOPS" = "TRUE"; }; EOFCONFIG diff --git a/install.sh b/install.sh index ab86013..d8b8335 100755 --- a/install.sh +++ b/install.sh @@ -207,6 +207,8 @@ generate_config() { local server_numeric="${4:-1}" local admin_location="${5:-Romania}" local admin_contact="${6:-admin@underchat.ro}" + local vhost="${7:-127.0.0.1}" + local network="${8:-underchat.org}" log_info "Generare fișier de configurare: $config_file" @@ -216,139 +218,275 @@ generate_config() { # Fișier de configurare pentru Nefarious IRCd # Generat automat în data: 2026 # Limba: Română +# Model: Node-Ase.ovh Professional IRC Server # ============================================================================ -# BLOC GENERAL - Setările principale ale serverului +# SECȚIUNE: GENERAL # ============================================================================ General { - # Numele serverului (trebuie să fie unic în rețea) + # Numele serverului (trebuie unic în rețea) name = "EOFCONFIG_NAME"; + # Virtual Host - IP pe care ascultă + vhost = "EOFCONFIG_VHOST"; + # Descrierea serverului description = "EOFCONFIG_DESC"; # Numeric-ul serverului (0-4095, trebuie unic în rețea) numeric = EOFCONFIG_NUMERIC; - # Calea către fișierul de log - logfile = "EOFCONFIG_PREFIX/log/ircd.log"; - - # Calea către motd (Message of the Day) - motd = "EOFCONFIG_PREFIX/etc/ircd.motd"; - - # Calea către opmotd (Message for operators) - opermotd = "EOFCONFIG_PREFIX/etc/ircd.opermotd"; + # Servere DNS pentru rezolvare domenii + dns server = "8.8.8.8"; + dns server = "1.1.1.1"; }; # ============================================================================ -# BLOC ADMIN - Informații administrator +# SECȚIUNE: ADMIN # ============================================================================ Admin { - # Locație - location = "EOFCONFIG_ADMIN_LOC"; + # Locații (maxim 2) + Location = "EOFCONFIG_NETWORK World"; + Location = "EOFCONFIG_ADMIN_LOC"; - # Contact - contact = "EOFCONFIG_ADMIN_CONTACT"; + # Contacti + Contact = "EOFCONFIG_ADMIN_CONTACT"; }; # ============================================================================ -# BLOC PORT - Porturile de ascultare +# SECȚIUNE: CLASE DE CONEXIUNI # ============================================================================ -Port { - # Port pentru clienți normali (implicit 6667) - port = 6667; - mask = 0.0.0.0; -}; -# Port pentru SSL -Port { - port = 6697; - mask = 0.0.0.0; - tls = yes; -}; - -# ============================================================================ -# BLOC ULINED - Servere de rețea (pentru testing local) -# ============================================================================ -Uline { - # Nume server - server = "services.underchat.ro"; -}; - -# ============================================================================ -# BLOC CLASS - Clase de conexiuni -# ============================================================================ +# Clasă pentru servere principale (hub) Class { - name = "clients"; - pingfreq = 120; - connectfreq = 60; + name = "Server"; + pingfreq = 1 minutes 30 seconds; + connectfreq = 5 minutes; + maxlinks = 1; + sendq = 9000000; +}; + +# Clasă pentru clienți obișnuiți +Class { + name = "Local"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; maxlinks = 100; - sendq = 40000; + usermode = "+iw"; }; +# Clasă pentru clienți normali (implicit) Class { - name = "servers"; - pingfreq = 60; - connectfreq = 300; - maxlinks = 10; - sendq = 1000000; + name = "Other"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 2048; + usermode = "+ix"; +}; + +# Clasă pentru operatori +Class { + name = "Opers"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 20; + local = no; + freeform = yes; + mode_lchan = yes; + deop_lchan = yes; + walk_lchan = yes; + show_invis = yes; + see_chan = yes; + list_chan = yes; + usermode = "+W"; + remove = yes; }; # ============================================================================ -# BLOC CLIENT - Restricții pentru clienți +# SECȚIUNE: CLIENT - Restricții pentru conexiuni # ============================================================================ + +# Configurare implicită pentru toți clienții Client { - class = "clients"; - maxlinks = 10; + host = "*@*"; + ip = "*@*"; + class = "Other"; + maxlinks = 6; }; # ============================================================================ -# BLOC CONNECT - Configurare conectări la alte servere +# SECȚIUNE: JUPED NICKS - Nick-uri rezervate # ============================================================================ -# Exemplu: Connect la un alt server -# Connect { -# name = "other.server.com"; -# host = "192.168.1.100"; -# port = 6667; -# maxlinks = 1; -# class = "servers"; -# password = "linker_password"; +Jupe { + # Litere și caractere speciale + nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; + + # Servicii de rețea + nick = "StatServ,NoteServ"; + nick = "ChanServ,ChanSaver"; + nick = "NickServ,NickSaver"; +}; + +# ============================================================================ +# SECȚIUNE: PORTURI +# ============================================================================ + +# Port pentru server-to-server +Port { + vhost = "EOFCONFIG_VHOST" 4400; + server = yes; + hidden = yes; +}; + +# Port standard pentru clienți +Port { + vhost = "EOFCONFIG_VHOST" 6667; + hidden = yes; +}; + +# Port SSL/TLS pentru clienți (opțional) +# Port { +# vhost = "EOFCONFIG_VHOST" 6697; +# ssl = yes; +# hidden = yes; # }; # ============================================================================ -# BLOC OPERATOR - Configurare operatori +# SECȚIUNE: OPERATORI # ============================================================================ + Operator { # Nickname-ul operatorului - nick = "root"; + name = "AdminRoot"; - # Password-ul operatorului (hash bcrypt) + # Password-ul operatorului (hash MD5/bcrypt/SMD5) # Generează cu: ./ircd/umkpasswd password = "$2a$04$NTy1i.X/8pXekNBNbMRlOu1JAjIiMfPGIe1sZf0Xqq.2jzqPMfN/G"; - # Permisiuni operator (vezi doc/opercmds.html) - privileges = "+all"; + # Host-uri permise pentru operator (*) + host = "*@*"; - # Host-uri permise pentru operator - host = "127.0.0.1"; - host = "localhost"; + # Clasă + class = "Opers"; + + # Permisiuni + # hide_oper = yes; + # hide_channels = yes; + # whois_notice = yes; + admin = yes; }; # ============================================================================ -# BLOC FEATURE - Caracteristici dinamice +# SECȚIUNE: CONNECT - Legări cu alte servere # ============================================================================ -Feature { - # Activează autenticarea - AUTH = "yes"; - # Activează channelurile persistente - PERSIST_CHANS = "no"; +# Exemplu: Connect la un server hub +# Connect { +# name = "hub.EOFCONFIG_NETWORK"; +# host = "192.168.1.100"; +# password = "hub_password"; +# port = 4400; +# class = "Server"; +# autoconnect = yes; +# hub; +# }; - # Timp maxim de inactivitate (secunde) - IDLETIME = 0; +# ============================================================================ +# SECȚIUNE: UWORLD - Servere de servicii +# ============================================================================ - # Activează SWHOIs - SWHOIS = "yes"; +# UWorld { +# name = "services.EOFCONFIG_NETWORK"; +# }; + +# ============================================================================ +# SECȚIUNE: FEATURE - Caracteristici și setări +# ============================================================================ + +features { + # Network details + "NETWORK" = "EOFCONFIG_NETWORK"; + "DOMAINNAME" = "EOFCONFIG_NETWORK"; + + # Logging + "LOG" = "SYSTEM" "FILE" "EOFCONFIG_PREFIX/log/ircd.log"; + "LOG" = "SYSTEM" "LEVEL" "CRIT"; + + # Server settings + "HUB" = "TRUE"; + "RELIABLE_CLOCK" = "FALSE"; + "WALLOPS_OPER_ONLY" = "TRUE"; + "NODNS" = "FALSE"; + "NOIDENT" = "FALSE"; + + # Client settings + "CLIENT_FLOOD" = "1024"; + "BUFFERPOOL" = "27000000"; + "DEFAULTMAXSENDQLENGTH" = "40000"; + + # Host hiding + "HOST_HIDING" = "TRUE"; + "HIDDEN_HOST" = "users.EOFCONFIG_NETWORK"; + "HIDDEN_IP" = "127.0.0.1"; + + # Channels + "MAXCHANNELSPERUSER" = "60"; + "CHANNELLEN" = "200"; + "MAXBANS" = "50"; + + # Nick settings + "NICKLEN" = "12"; + "NICKNAMEHISTORYLENGTH" = "800"; + + # Timing + "HANGONGOODLINK" = "300"; + "HANGONRETRYDELAY" = "10"; + "CONNECTTIMEOUT" = "90"; + "PINGFREQUENCY" = "120"; + "CONNECTFREQUENCY" = "600"; + + # Welcome messages + "MPATH" = "EOFCONFIG_PREFIX/etc/ircd.motd"; + "RPATH" = "EOFCONFIG_PREFIX/etc/remote.motd"; + "PPATH" = "EOFCONFIG_PREFIX/var/ircd.pid"; + + # Stats visibility + "HIS_STATS_u" = "FALSE"; + "HIS_STATS_U" = "TRUE"; + + # Whois privacy + "HIS_WHOIS_SERVERNAME" = "TRUE"; + "HIS_WHOIS_IDLETIME" = "TRUE"; + "HIS_WHOIS_LOCALCHAN" = "TRUE"; + + # Who privacy + "HIS_WHO_SERVERNAME" = "TRUE"; + "HIS_WHO_HOPCOUNT" = "TRUE"; + + # Network info + "HIS_NETSPLIT" = "TRUE"; + "HIS_SERVERNAME" = "*.EOFCONFIG_NETWORK"; + "HIS_SERVERINFO" = "The EOFCONFIG_NETWORK World"; + + # Operational + "CHECK" = "TRUE"; + "CHECK_EXTENDED" = "TRUE"; + "MAX_CHECK_OUTPUT" = "1000"; + + # Admin commands + "SETHOST" = "TRUE"; + "NETWORK_REHASH" = "TRUE"; + + # Channel modes + "HALFOPS" = "TRUE"; + + # SSL/TLS + # "SSL_CERTFILE" = "EOFCONFIG_PREFIX/etc/ircd.pem"; + # "SSL_KEYFILE" = "EOFCONFIG_PREFIX/etc/ircd.pem"; + # "SSL_NOSSLv3" = "TRUE"; + + # CTCP versioning + "CTCP_VERSIONING" = "FALSE"; }; EOFCONFIG @@ -360,6 +498,8 @@ EOFCONFIG sed -i "s|EOFCONFIG_PREFIX|$PREFIX|g" "$config_file" sed -i "s|EOFCONFIG_ADMIN_LOC|$admin_location|g" "$config_file" sed -i "s|EOFCONFIG_ADMIN_CONTACT|$admin_contact|g" "$config_file" + sed -i "s|EOFCONFIG_VHOST|$vhost|g" "$config_file" + sed -i "s|EOFCONFIG_NETWORK|$network|g" "$config_file" log_success "Fișier de configurare generat: $config_file" return 0 @@ -439,11 +579,17 @@ main() { # Citire interactivă de parametri echo "" echo -e "${GALBEN}Completare setări server:${NC}" - read -p " Nume server [localhost.localdomain]: " server_name - server_name=${server_name:-localhost.localdomain} + read -p " Domeniu rețea [underchat.org]: " network_name + network_name=${network_name:-underchat.org} - read -p " Descriere server [Nefarious IRCd Server]: " server_desc - server_desc=${server_desc:-Nefarious IRCd Server} + read -p " Nume server [ns1.${network_name}]: " server_name + server_name=${server_name:-ns1.${network_name}} + + read -p " Descriere server [The ${network_name} Network]: " server_desc + server_desc=${server_desc:-The ${network_name} Network} + + read -p " Virtual Host / IP [127.0.0.1]: " vhost_ip + vhost_ip=${vhost_ip:-127.0.0.1} read -p " Numeric server [1]: " server_numeric server_numeric=${server_numeric:-1} @@ -451,14 +597,16 @@ main() { read -p " Locație admin [Romania]: " admin_location admin_location=${admin_location:-Romania} - read -p " Contact admin [admin@underchat.ro]: " admin_contact - admin_contact=${admin_contact:-admin@underchat.ro} + read -p " Contact admin [admin@${network_name}]: " admin_contact + admin_contact=${admin_contact:-admin@${network_name}} else server_name=$(grep 'name = "' "$CONFIG_FILE" 2>/dev/null | head -1 | cut -d'"' -f2) server_name=${server_name:-localhost.localdomain} + vhost_ip="127.0.0.1" + network_name="underchat.org" fi - generate_config "$conf_file" "$server_name" "$server_desc" "$server_numeric" "$admin_location" "$admin_contact" + generate_config "$conf_file" "$server_name" "$server_desc" "$server_numeric" "$admin_location" "$admin_contact" "$vhost_ip" "$network_name" if [ $? -ne 0 ]; then exit 1 fi