Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: trim attribute prefix "@" character #79

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Fix: trim attribute prefix "@" character #79

merged 1 commit into from
Jul 27, 2020

Conversation

Loyalsoldier
Copy link
Collaborator

@Loyalsoldier Loyalsoldier commented Jul 27, 2020

This commit fixes the @attr function.

@Loyalsoldier
Copy link
Collaborator Author

Have tested on my local V2Ray and it works.

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

Can you provide test data? I use geosite:baidu-ads@ads but core can't start.

image

@Loyalsoldier
Copy link
Collaborator Author

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

My config:

{
  "domain": [
    "geosite:baidu-ads@ads"
  ],
  "outboundTag": "blocked",
  "type": "field"
}

image

Even geosite:baidu-ads

image

Maybe there's something wrong?

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

I use manual compile and your GitHub Action.

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

Passed. I change IPIfNonMatch to AsIs

@Loyalsoldier
Copy link
Collaborator Author

I think you should quit the program, clear DNS cache, and then reopen it.

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

In my environment, if geosite:cn exists, geosite:baidu-ads@ads won't work.

image

{
    "dns": {
        "servers": [
            "8.8.8.8",
            "8.8.4.4",
            "223.5.5.5",
            "114.114.114.114",
            "localhost"
        ]
    },
    "inbounds": [
        {
            "port": "1080",
            "protocol": "http",
            "settings": {
            },
            "tag": "http"
        },
        {
            "port": "1081",
            "protocol": "socks",
            "settings": {
                "auth": "noauth",
                "udp": true
            },
            "tag": "socks"
        }
    ],
    "log": {
        "loglevel": "warning"
    },
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {
            },
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "settings": {
            },
            "tag": "blocked"
        }
    ],
    "policy": {
    },
    "reverse": {
    },
    "routing": {
        "settings": {
            "domainStrategy": "IPIfNonMatch",
            "rules": [
                {
                    "domain": null,
                    "ip": [
                        "geoip:cn",
                        "geoip:private"
                    ],
                    "outboundTag": "direct",
                    "port": null,
                    "type": "field"
                },
                {
                    "domain": [
                        "geosite:cn",
                        "geosite:nike",
                        "geosite:apple"
                    ],
                    "outboundTag": "direct",
                    "type": "field"
                },
                {
                    "domain": [
                        "geosite:baidu-ads@ads"
                    ],
                    "outboundTag": "blocked",
                    "type": "field"
                }
            ]
        },
        "strategy": "rules"
    },
    "stats": {
    },
    "transport": {
    }
}

@DuckSoft
Copy link
Member

block rules should be in front of direct & proxy rules.

@EpLiar
Copy link
Member

EpLiar commented Jul 27, 2020

block rules should be in front of direct & proxy rules.

Okay.

@Loyalsoldier Loyalsoldier merged commit 31595ff into v2fly:master Jul 27, 2020
@Loyalsoldier Loyalsoldier deleted the fix-attribute branch July 27, 2020 02:53
@Robot-DaneelOlivaw
Copy link
Contributor

Super! Now we can use attribute as we want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants