========================================================================
  RMS TECH  -  INTERNET BOOST   /   Otimizacao de Internet (Ping/Rede/DNS)
  by @rms.tech   |   Distribuicao gratuita / Free to share
========================================================================

ARQUIVOS (mantenha os DOIS na mesma pasta):
  - RMS-TECH-INTERNET-BOOST.bat   -> voce clica neste
  - RMS-TECH-INTERNET-BOOST.ps1   -> a interface (nao precisa abrir)

--------------------------  PORTUGUES  ---------------------------------

O QUE E
  Um conjunto de tweaks de rede/registro pra reduzir ping e melhorar a
  estabilidade da internet. O .bat pede admin e abre um menu bonito
  (setas do teclado). Antes de mexer em qualquer coisa ele faz backup
  de tudo, e tem a opcao de restaurar.

O QUE ELE FAZ

  REGISTRO (equivalente ao GPEDIT "Limitar largura de banda reservavel"
  + Nagle's Algorithm + MSMQ):
    - QoS Packet Scheduler: libera a banda reservada (NonBestEffortLimit = 0)
    - Nagle's Algorithm desligado (TcpAckFrequency = 1, TCPNoDelay = 1)
      em cada placa/adaptador de rede configurado
    - MSMQ: TCPNoDelay = 1

  PLACA DE REDE (Gerenciador de Dispositivos > Propriedades avancadas):
    - Energy Efficient Ethernet (Eficiencia de Energia) desligado
    - Green Ethernet (Ethernet Verde) desligado
    - Power Saving Mode (Economia de Energia) desligado
    - Interrupt Moderation (Moderacao de Interrupcao) desligado
    - "Permitir que o computador desligue este dispositivo" desligado
    (so mexe nas opcoes que existirem na SUA placa - cada fabricante
    expoe um conjunto diferente, o script pula o que nao encontrar)

  DNS (opcional, voce escolhe no menu):
    - Cloudflare (1.1.1.1 / 1.0.0.1) ou Google (8.8.8.8 / 8.8.4.4)
    - ou nao mexer, se preferir manter o DNS atual

  MANUTENCAO (roda sempre, sao comandos pontuais, nao precisam de
  "desfazer"):
    - ipconfig /renew
    - ipconfig /flushdns
    - netsh winsock reset

COMO USAR
  1. Clique 2x em "RMS-TECH-INTERNET-BOOST.bat" e aceite o "Sim" do
     Windows (UAC = permissao de administrador).
  2. Use as SETAS (cima/baixo) + ENTER. Escolha [1] Aplicar otimizacoes.
  3. Escolha o DNS: [A] Cloudflare, [B] Google ou [C] nao mexer.
  4. Confirme com "S". Ao terminar, REINICIE O PC.

DESFAZER
  Abra de novo e escolha [2] Restaurar ultimo backup. Ele desfaz os
  valores de registro, volta as propriedades da placa de rede e o DNS
  ao estado original, usando o backup mais recente da pasta
  "Backup_RMS_INTERNET". Reinicie o PC depois.
  (os comandos de manutencao - renew/flushdns/winsock reset - nao tem
  "desfazer" porque sao comandos pontuais, nao configuracoes salvas)

BACKUPS
  Ficam em "Backup_RMS_INTERNET", ao lado dos scripts, por data e hora.
  Nao apague se quiser poder voltar atras.

AVISO
  - Windows 10/11 + permissao de administrador.
  - Mexe no Registro e nas propriedades da placa de rede. Use por sua
    conta e risco.
  - "netsh winsock reset" reseta o catalogo do Winsock pro padrao -
    se voce usa VPN ou algum software de seguranca que se integra na
    rede, pode ser necessario reinstalar/reconfigurar ele depois.
    So tem efeito completo apos reiniciar o PC.
  - As opcoes de "PLACA DE REDE" variam de fabricante pra fabricante
    (Realtek, Intel, etc). O script so mexe no que encontrar na sua
    placa - nao e erro se pular alguma opcao.
  - Antivirus / SmartScreen podem reclamar de script que pede admin.
    E falso positivo: os arquivos sao texto puro, abra no Bloco de
    Notas e leia. Em "Mais informacoes" > "Executar assim mesmo".
  - Ao terminar de aplicar, o script abre este link no navegador:
    https://otimizar.superpackultimate.com/?de=packs

----------------------------  ENGLISH  --------------------------------

WHAT IT IS
  Network/registry tweaks to reduce ping and improve connection
  stability. The .bat elevates and opens an arrow-key menu. It backs
  up everything before changing anything and can restore it.

WHAT IT DOES

  REGISTRY (equivalent to the GPEDIT "Limit reservable bandwidth"
  policy + Nagle's Algorithm + MSMQ):
    - QoS Packet Scheduler: releases reserved bandwidth (NonBestEffortLimit = 0)
    - Nagle's Algorithm off (TcpAckFrequency = 1, TCPNoDelay = 1) on
      every configured network adapter
    - MSMQ: TCPNoDelay = 1

  NETWORK ADAPTER (Device Manager > Advanced properties):
    - Energy Efficient Ethernet off
    - Green Ethernet off
    - Power Saving Mode off
    - Interrupt Moderation off
    - "Allow the computer to turn off this device" off
    (only touches whichever of these exist on YOUR adapter - every
    vendor exposes a different set, the script skips what it can't find)

  DNS (optional, your choice in the menu):
    - Cloudflare (1.1.1.1 / 1.0.0.1) or Google (8.8.8.8 / 8.8.4.4)
    - or leave it untouched

  MAINTENANCE (always runs, one-off commands, nothing to undo):
    - ipconfig /renew
    - ipconfig /flushdns
    - netsh winsock reset

HOW TO USE
  1. Double-click "RMS-TECH-INTERNET-BOOST.bat", accept the UAC prompt.
  2. Arrow keys + Enter. Pick [1] Apply tweaks.
  3. Choose DNS: [A] Cloudflare, [B] Google, or [C] leave it alone.
  4. Confirm with "S". When done, RESTART YOUR PC.

UNDO
  Open again, pick [2] Restore last backup. Reverts the registry
  values, the NIC properties and DNS back to the original state using
  the newest backup in "Backup_RMS_INTERNET". Restart afterwards.
  (the maintenance commands have no "undo" - they're one-off actions,
  not saved settings)

NOTES
  - Windows 10/11, administrator rights.
  - Edits the Registry and NIC properties. Use at your own risk.
  - "netsh winsock reset" resets the Winsock catalog to default - if
    you use a VPN or security software that hooks into networking,
    you may need to reinstall/reconfigure it afterwards. Only fully
    effective after a restart.
  - "NETWORK ADAPTER" options vary by vendor (Realtek, Intel, etc).
    The script only touches what it finds on your adapter - it's not
    an error if some options are skipped.
  - Antivirus / SmartScreen may flag a self-elevating script. False
    positive - the files are plain text, open and read them.
  - When the optimization finishes, the script opens this link in your
    browser: https://otimizar.superpackultimate.com/?de=packs

========================================================================
  Gostou? Compartilha e segue  @rms.tech
========================================================================
