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

feat: programmatically set agentVersion in identify #1240

Closed
wants to merge 6 commits into from

Conversation

6d7a
Copy link
Contributor

@6d7a 6d7a commented Jun 10, 2022

If no agentVersion is provided for the Identify protocol, the default AGENT_VERSION will now be set to

  • js-libp2p/<libp2p.version> UserAgent=<process.version> when running in Node.js
  • js-libp2p/<libp2p.version> UserAgent=<navigator.userAgent> when running in the browser (also when running in a webworker)

Fixes #686

6d7a added 3 commits June 10, 2022 11:59
If no agentVersion is provided to the Identity protocol, UserAgent information will be appended to the default AGENT_VERSION
Set the current libp2p version as the default AGENT_VERSION
@6d7a
Copy link
Contributor Author

6d7a commented Jun 13, 2022

@jacobheun, tagging you as the OP of the issue (:

@6d7a 6d7a closed this Jun 14, 2022
Provide libp2p version through a prebuild script instead of aegir define
@6d7a 6d7a reopened this Jun 14, 2022
@mpetrunic mpetrunic requested review from achingbrain and removed request for achingbrain June 14, 2022 15:55
@mpetrunic mpetrunic added the need/maintainer-input Needs input from the current maintainer(s) label Jun 21, 2022
@achingbrain achingbrain changed the title refactor: programmatically set agentVersion in identify feat: programmatically set agentVersion in identify Jul 15, 2022
@achingbrain
Copy link
Member

Thanks for submitting this, sorry it's taken me so long to get to it. It looks good but I tried to push some additional commits to this branch but it seems to be out of date so this will be continued in #1296

achingbrain added a commit that referenced this pull request Jul 15, 2022
If no `agentVersion` is provided for the Identify protocol, the default `AGENT_VERSION` will now be set to
* `js-libp2p/<libp2p.version> UserAgent=<process.version>` when running in Node.js
* `js-libp2p/<libp2p.version> UserAgent=<navigator.userAgent>` when running in the browser (also when running in a webworker)

Fixes #686
Supersedes #1240

Co-authored-by: Kevin Westphal <[email protected]>
Co-authored-by: Kevin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/maintainer-input Needs input from the current maintainer(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Programmatically set agentVersion in Identify
3 participants