3X-UI is a fancy user interface for Xray, an anti censorship vpn solution.

it can be installed via

sudo curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh > 3x-installer.sh
chmod +x 3x-installer.sh
sudo ./3x-installer.sh

it does a bunch of stuff, and then outputs something like this

Username: janama
Password: jajajaj
Port: 18148
WebBasePath: alalalalajajan
Access URL: http://yourpublicip:18148/alalalalajajan

this means you can access the 3x-ui panel at theipofthatdevice:18148/alalalalajajan e.g. 192.168.2.222:18148/alalalalajajan

if you are using xray for access to your remote lan, you are going to want to allow private ip access in that panel, so login with that username and password, then go to xray configs advanced

Then select all, delete, and paste this in.

{
  "log": {
    "access": "none",
    "dnsLog": false,
    "error": "",
    "loglevel": "warning",
    "maskAddress": ""
  },
  "api": {
    "tag": "api",
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ]
  },
  "inbounds": [
    {
      "tag": "api",
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      }
    }
  ],
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "AsIs",
        "redirect": "",
        "noises": []
      }
    },
    {
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true,
      "statsOutboundDownlink": true,
      "statsOutboundUplink": true
    }
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api"
      }
    ]
  },
  "stats": {}
}