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

Amir's Changes to Test Connectivity #275

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open

Amir's Changes to Test Connectivity #275

wants to merge 63 commits into from

Conversation

fortuna
Copy link
Contributor

@fortuna fortuna commented Sep 6, 2024

No description provided.

tcpReports = append(tcpReports, report)
},
})
ctx = getReportFromTrace(ctx, r, hostname)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of our codes have a race condition. We need a mutex to append to the DNS queries and TCP connections.

I was imagining a different function here, one that takes callbacks with the dns and tcp reports instead, and the function can then append to whatever we need. That way the function doesn't depend on the specific report format.

BTW, it shouldn't depend on r, because the scope is too broad. It only needs the dns and tcp reports.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fortuna yes the race condition issue stands. I was planning to do that next. I can reduce the dependency on the report format

r.DNSQueries = append(r.DNSQueries, report)
},
ConnectStart: func(network, addr string) {
connectStart = time.Now()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct behavior. In Happy Eyeballs we can have overlapping connection attempts.

We need a map network, addr -> start time instead.

amircybersec and others added 28 commits September 6, 2024 00:35
* feat: allow unencoded `userinfo` as per SIP002

* Move shadowsocks config tests to `shadowsocks_test.go` and clean up.

* Review comment.

* Add test case for invalid cipher info (e.g. missin colon).

* Remove unnecessary prefix in test.
@amircybersec
Copy link
Contributor

Rebasing this branch on the top main has cluttered this PR. I am going to make a new PR based on top of main to avoid the clutter here.

Base automatically changed from fortuna-tc to main September 20, 2024 16:41
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.

3 participants