GithubHelp home page GithubHelp logo

udp random ports?? about x-ui HOT 6 CLOSED

oops10101 avatar oops10101 commented on September 9, 2024
udp random ports??

from x-ui.

Comments (6)

MK0ltra avatar MK0ltra commented on September 9, 2024

Did you use xray to run a socks5 proxy? If yes try adding "udp": true in inbound configuration.

from x-ui.

oops10101 avatar oops10101 commented on September 9, 2024

Did you use xray to run a socks5 proxy? If yes try adding "udp": true in inbound configuration.

hey there appreciate the help but no I don't use x-ray to run the proxy I only want to use it as my outbound.
proxy is from a third party which I have no control over their server-side operation but it seems to have no problem with UDP in other client softwares that I'm using to connect to their proxy

from x-ui.

MK0ltra avatar MK0ltra commented on September 9, 2024

I see. There's no inbound in your configuration and based on logs i can say there's a vless websocket as an inbound right? Just wanna make sure what you trying to do. You want some part of traffic going through socks5 outbound or all of it?

from x-ui.

oops10101 avatar oops10101 commented on September 9, 2024

I see. There's no inbound in your configuration and based on logs i can say there's a vless websocket as an inbound right? Just wanna make sure what you trying to do. You want some part of traffic going through socks5 outbound or all of it?

yeah I have made a rule for the inbound port 443s traffic (vless websocket) to go through socks5 proxy outbound and the result is udp packets specially DNS lookups not getting through and the resulting connection not being able to open any websites in chrome(DNS lookups are sent with udp) but working just fine using apps with no need for DNS lookups like telegram.
if it helps to understand the objective here the socks outbound part has nothing to do with my ability to get through irans gfw

from x-ui.

MK0ltra avatar MK0ltra commented on September 9, 2024

There's no need to that routing rule since first outbound is socks5, all outgoing traffic will go through your socks5.
I've removed the fakedns, change dns resolvers to 8.8.8.8, 1.1.1.1 and add "domainStrategy": "UseIP" to socks5 outbound. Please add your inbound and socks5 outbound details to following config and see if it's works:

{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "tag": "api"
    }
  ],
  "log": {
    "loglevel": "debug",
    "access": "/home/ll.log",
    "error": "/home/bb.log"
  },
  "outbounds": [
    {
      "tag": "tttag",
      "protocol": "socks",
      "settings": {
        "domainStrategy": "UseIP",
        "servers": [
          {
            "address": "92.61.107.63",
            "port": 12324,
            "users": [
              {
                "user": "redacted or smthing",
                "pass": "same"
              }
            ]
          }
        ]
      }
    },
    {
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIP"
      },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  },
  "stats": {},
  "dns": {
    "servers": [
      "8.8.8.8",
      "1.1.1.1"
    ],
    "queryStrategy": "UseIP",
    "tag": "dns_inbound"
  }
}

from x-ui.

oops10101 avatar oops10101 commented on September 9, 2024

There's no need to that routing rule since first outbound is socks5, all outgoing traffic will go through your socks5. I've removed the fakedns, change dns resolvers to 8.8.8.8, 1.1.1.1 and add "domainStrategy": "UseIP" to socks5 outbound. Please add your inbound and socks5 outbound details to following config and see if it's works:

{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "tag": "api"
    }
  ],
  "log": {
    "loglevel": "debug",
    "access": "/home/ll.log",
    "error": "/home/bb.log"
  },
  "outbounds": [
    {
      "tag": "tttag",
      "protocol": "socks",
      "settings": {
        "domainStrategy": "UseIP",
        "servers": [
          {
            "address": "92.61.107.63",
            "port": 12324,
            "users": [
              {
                "user": "redacted or smthing",
                "pass": "same"
              }
            ]
          }
        ]
      }
    },
    {
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "UseIP"
      },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  },
  "stats": {},
  "dns": {
    "servers": [
      "8.8.8.8",
      "1.1.1.1"
    ],
    "queryStrategy": "UseIP",
    "tag": "dns_inbound"
  }
}

Hey man thank you so much.
I still don't know what I was doing wrong in my routing that caused UDP packets to drop (I know I was making it unnecessarily complicated) idk maybe it was the "domainStrategy": "UseIP", I'll try to figure it out but anyway this fixed it right up.
Absolute LEGEND.
thank you

from x-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.