Skip to content

Instantly share code, notes, and snippets.

View galvesribeiro's full-sized avatar
:shipit:
Working like hell!

Gutemberg Ribeiro galvesribeiro

:shipit:
Working like hell!
View GitHub Profile
@galvesribeiro
galvesribeiro / Claro-XGS-PON-8311.md
Last active May 21, 2026 06:13
Cloning a Claro (Brazil) ZTE F8748Q XGS-PON ONT onto an 8311 SFP Module

Cloning a Claro (Brazil) ZTE F8748Q XGS-PON ONT onto an 8311 SFP Module

This tutorial covers cloning the identity of a Claro Brazil XGS-PON ZTE ZXHN F8748Q ONT into an 8311 X-ONU-SFPP SFP module, so you can run your own router/firewall directly on the fiber without the ISP modem and without double-NAT.

Companion docs: see vivo-8311-clone-tutorial for the Vivo/Askey equivalent. The Vivo line uses PPPoE; Claro uses DHCP/IPoE — the cloning approach is similar but the failure modes and the critical "gotcha" differ.


The one thing that will trip you up: TWO MACs, TWO layers

@galvesribeiro
galvesribeiro / Vivo-XGS-PON-8311.md
Last active May 21, 2026 06:13
Cloning a Vivo (Brazil) ASKEY XGS-PON ONT onto an 8311 SFP Module

Cloning a Vivo (Brazil) ASKEY XGS-PON ONT onto an 8311 SFP Module

This tutorial walks through cloning the OMCI/PON identity of a Vivo Brazil XGS-PON ASKEY ONT (RTF8316VW family) into a 8311 X-ONU-SFPP running the Community Firmware MOD by djGrrr. The result is a transparent SFP module that the OLT/BRAS treats as the original Askey, letting you bypass the ISP's modem entirely and use your own router/firewall.

Scope. This guide covers what to read from the Askey and what to set on the 8311. The host SFP+ cage and downstream router are deliberately not covered — pick whatever fits your topology (MikroTik, UniFi, OPNsense, pfSense, a managed switch with SFP+, etc.). The 8311 just bridges PON ↔ Ethernet; the host does PPPoE.

Companion docs: see claro-8311-clone-tutorial for the Claro/ZTE equivalent. The Vivo line uses PPPoE; Claro uses DHCP/IPoE — the cloning approac

@galvesribeiro
galvesribeiro / EFG-Broken.md
Last active May 21, 2026 06:54
Why Your Ubiquiti EFG Can't Push 25 Gbps Inter-VLAN — and What's Actually Going On

Why Your Ubiquiti EFG Can't Push 25 Gbps Inter-VLAN — and What's Actually Going On

Or: How I Reproduced the Problem on x86, Tried to Load the Missing Modules on the Real Device, and What That Tells Us About Ubiquiti's Kernel


TL;DR

Ubiquiti markets the Enterprise Fortress Gateway (EFG) as a 25-gigabit-class router. The product page lists two 25 GbE SFP28 ports for WAN/LAN, and Ubiquiti positions the device as a flagship for medium and large enterprise deployments. Its silicon — a Marvell Octeon CN9670 — supports hardware-accelerated forwarding through purpose-built network engines (NIX) that should sustain tens of millions of packets per second. The UDM Beast, Ubiquiti's next-generation gateway, pairs a Marvell Octeon CN10K SoC (with ARM Neoverse N2 cores) with a dedicated Marvell Prestera-class switching ASIC accessed via PCIe — capabilities that, properly used, would offload most of the per-packet forwarding work into hardware.

@galvesribeiro
galvesribeiro / vault_raft_bu_restore_example.sh
Created November 13, 2020 17:03 — forked from mikegreen/vault_raft_bu_restore_example.sh
Vault raft snapshot backup and restore quick demo
# 2020-06-23
# this shows creating a Vault instance running integrated storage/raft,
# then adding a KV and taking a snapshot
# then kill the raft DB files to simulate a storage failure
# repeat new Vault instance, restore snapshot, unseal and auth with orig keys
# and read some data to show how backup/restore works
# not meant to be a live script to run!
# this uses the vault_config.hcl from https://gist.github.com/mikegreen/c2df5eea2283f0dbc5f3a5d3650536fd
@galvesribeiro
galvesribeiro / Custom Blazor Startup.html
Created April 11, 2020 18:50 — forked from SQL-MisterMagoo/Custom Blazor Startup.html
Custom Blazor Startup Example with custom Retries/Interval and custom Reconnection Handler (not production code)
<script autostart="false" src="_framework/blazor.server.js"></script>
<script>
async function connectionDown(options) {
console.log("Connection Down - you could do some UI here...");
for (let i = 0; i < options.maxRetries; i++) {
console.log("Waiting for reconnect attempt #"+(i+1)+" ...");
await this.delay(options.retryIntervalMilliseconds);
if (this.isDisposed) {
break;
}
public RequestDevice = (options: USBRequestDeviceOptions): Promise<DeviceFound> => {
function isEmpty(obj) {
for (var prop in obj) {
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
return false;
}
}
return true;
}
@galvesribeiro
galvesribeiro / OrleansExtensions.cs
Created September 4, 2018 19:00
Orleans + Asp.Net Core + GenericHost
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Orleans;
using Orleans.Hosting;
using SignalR.Orleans;
using System;
using System.Collections.Generic;
@galvesribeiro
galvesribeiro / OrleansExtensions.cs
Created June 21, 2018 16:11
Orleans support to Microsoft.Extensions.Hosting
public static class OrleansExtensions
{
private const string SiloBuilderKey = "OrleansSiloBuilderInstance";
public static IHostBuilder AddOrleans(this IHostBuilder hostBuilder, Action<ISiloHostBuilder> configure)
{
var siloHostBuilder = GetSiloBuilder(hostBuilder);
configure?.Invoke(siloHostBuilder);
siloHostBuilder.ConfigureDefaults();
siloHostBuilder.GetApplicationPartManager().ConfigureDefaults();
public interface IPromiseCallbackHandler
{
void SetResult(string json);
void SetError(string error);
}
@galvesribeiro
galvesribeiro / Logger.cs
Created April 29, 2018 06:17
Blazor Logger
public static class Logger
{
public static void Log(object message)
{
RegisteredFunction.Invoke<bool>(
"Logger.Log",
JsonUtil.Serialize(message));
}
public static void Error(object error)