Skip to content

Commit

Permalink
Remove redundant qualifier from RulesBean initialization (#3738)
Browse files Browse the repository at this point in the history
- Removed the redundant qualifier `V2rayConfig.RoutingBean.RulesBean` in favor of directly using `RulesBean`.
- This simplifies the code and improves readability by removing unnecessary fully qualified names.
- The change ensures cleaner and more maintainable code without altering functionality.
  • Loading branch information
CodeWithTamim authored Oct 22, 2024
1 parent 77042f6 commit 796bad1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ object V2rayConfigUtil {

// DNS routing tag
v2rayConfig.routing.rules.add(
0, V2rayConfig.RoutingBean.RulesBean(
0, RulesBean(
inboundTag = arrayListOf("dns-in"),
outboundTag = "dns-out",
domain = null
Expand Down Expand Up @@ -363,7 +363,7 @@ object V2rayConfigUtil {

if (Utils.isPureIpAddress(domesticDns.first())) {
v2rayConfig.routing.rules.add(
0, V2rayConfig.RoutingBean.RulesBean(
0, RulesBean(
outboundTag = TAG_DIRECT,
port = "53",
ip = arrayListOf(domesticDns.first()),
Expand Down Expand Up @@ -397,7 +397,7 @@ object V2rayConfigUtil {
// DNS routing
if (Utils.isPureIpAddress(remoteDns.first())) {
v2rayConfig.routing.rules.add(
0, V2rayConfig.RoutingBean.RulesBean(
0, RulesBean(
outboundTag = TAG_PROXY,
port = "53",
ip = arrayListOf(remoteDns.first()),
Expand Down

0 comments on commit 796bad1

Please sign in to comment.