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

generate gfwlist.txt #215

Merged
merged 5 commits into from
Sep 20, 2020
Merged

generate gfwlist.txt #215

merged 5 commits into from
Sep 20, 2020

Conversation

kslr
Copy link
Contributor

@kslr kslr commented Sep 19, 2020

domain 转换成 ||
full 转换成 |http:// 和 |https://
keyword 直接输出
regex 转换成 /....../

TIP git squash

@kslr kslr requested a review from a user September 19, 2020 21:09
@Loyalsoldier
Copy link
Collaborator

Loyalsoldier commented Sep 19, 2020

I think it's better to move this code block outside the for loop:

if refName == "GEOLOCATION-!CN" {
  if err := pl.toGfwList(); err != nil {
    fmt.Println("Failed: ", err)
  }
}

And then rename the func exportPlainTextList to exportList.

The following code

case "keyword":
    entryBytes = append(entryBytes, []byte(entry.Type+entry.Value+"\n")...)

is missing a string separator between type and value. I wonder if GFWList supports keyword?

main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@kslr
Copy link
Contributor Author

kslr commented Sep 20, 2020

I think it's better to move this code block outside the for loop:

if refName == "GEOLOCATION-!CN" {
  if err := pl.toGfwList(); err != nil {
    fmt.Println("Failed: ", err)
  }
}

And then rename the func exportPlainTextList to exportList.

The following code

case "keyword":
    entryBytes = append(entryBytes, []byte(entry.Type+entry.Value+"\n")...)

is missing a string separator between type and value. I wonder if GFWList supports keyword?

Fix

@kslr kslr requested review from xiaokangwang, a user and Loyalsoldier September 20, 2020 07:31
@kslr kslr changed the title generate gfwlist.pac generate gfwlist.txt Sep 20, 2020
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

3 participants