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

[Bug] EOF #1699

Open
9 tasks done
okami-chen opened this issue Dec 7, 2024 · 0 comments
Open
9 tasks done

[Bug] EOF #1699

okami-chen opened this issue Dec 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@okami-chen
Copy link

Verify steps

  • I have read the documentation and understand the meaning of all the configuration items I have written, rather than just piling up seemingly useful options or default values.
  • I have carefully reviewed the documentation and have not resolved the issue.
  • I have searched the Issue Tracker for the issue I want to raise and did not find it.
  • I am a non-Chinese user.
  • I have tested with the latest Alpha branch version, and the issue still persists.
  • I have provided the server and client configuration files and processes that can reproduce the issue locally, rather than a sanitized complex client configuration file.
  • I provided the simplest configuration that can be used to reproduce the errors in my report, rather than relying on remote servers or piling on a lot of unnecessary configurations for reproduction.
  • I have provided complete logs, rather than just the parts I think are useful out of confidence in my own intelligence.
  • I have directly reproduced the error using the Mihomo command-line program, rather than using other tools or scripts.

Operating System

Linux

System Version

1.10.18

Mihomo Version

1.10.18

Configuration File

map[string]interface {}{"cipher":"aes-256-gcm", "name":"🇭🇰 HK L33 新界 HGC", "origin":"🇭🇰HK-09 N1 HGC", "pasord":"84e6fe4d-8ef1-4cbe-a9db-ea12ad13", "port":"30482", "server":"gp1028jg.xxx.xx", "type":"ss", "udp":true}

Description

 error: Get "http://ip-api.com/json/?lang=zh-CN&fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,offset,currency,isp,org,as,asname,reverse,mobile,proxy,hosting,query": EOF

Reproduction Steps


func main(){
    mata.SetRemoteAddress("ip-api.com:80")
    ctx := context.Background()
    resp = spider.HttpGeoGet(ctx, mata, row.Body.Map())
}

func HttpGeoGet(ctx context.Context, meta C.Metadata, node map[string]any) []byte {
	proxy, err := adapter.ParseProxy(node)
	if err != nil {
		return []byte("")
	}
	conn, err := proxy.Adapter().DialContext(ctx, &meta)
	if err != nil {
		log.Warningf(ctx, "DialContext %s error: %s", proxy.Name(), err)
		return []byte("")
	}
	defer conn.Close()

	client := resty.New().SetTransport(&http.Transport{
		DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
			return conn, nil
		},
	}).SetTimeout(time.Millisecond * 4500)

	resp, err := client.R().
		SetHeader("User-Agent", userAgent).
		Get(httpGeoInfoUrl())
	if err == nil {
		g.Log().Infof(ctx, "geo.query %#v ", resp.String())
		return resp.Body()
	}
	g.Log().Warningf(ctx, "geo.error %#v error: %s", node, err.Error())
	return []byte("")
}

Logs

map[string]interface {}{"cipher":"aes-256-gcm", "name":"🇭🇰 HK L33 新界 HGC", "origin":"🇭🇰HK-09 N1 HGC", "pasord":"84e6fe4d-8ef1-4cbe-a9db-ea12ad1ef696", "port":"30482", "server":"gp1028jg.mtls.xyz", "type":"ss", "udp":true} error: Get "http://ip-api.com/json/?lang=zh-CN&fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,offset,currency,isp,org,as,asname,reverse,mobile,proxy,hosting,query": EOF
@okami-chen okami-chen added the bug Something isn't working label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant