Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Adds anonymous logon #3

Closed
wants to merge 2 commits into from

Conversation

crossworth
Copy link

I'm not sure if I'm building the logOn message correctly yet, it logons on Steam without problems, but maybe something is missing, I need do more testing before it can be merged.

In the mean while I have a question:

On the Node library the SteamID Instance for the anonymous account is ALL where in this library is Unknown, on the C# library it's All as well, maybe it sould be called AllInstance to match the others libraries?

https://github.com/DoctorMcKay/node-steamid/blob/4cbc98c2723ea92eba021a937dd9c7ae033ebe3f/index.js#L31
https://github.com/SteamRE/SteamKit/blob/master/SteamKit2/SteamKit2/Types/SteamID.cs#L72

@crossworth crossworth marked this pull request as draft August 30, 2020 00:15
@@ -6,10 +6,11 @@ import (

pb "github.com/13k/go-steam-resources/protobuf/steam"
"github.com/13k/go-steam-resources/steamlang"
"google.golang.org/protobuf/proto"
Copy link
Author

Choose a reason for hiding this comment

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

Sorry about this change, Goland sort the imports by external then internal packages...

@crossworth
Copy link
Author

I have tested this implementation on OSX, Linux and Windows and found no problems, I have checked the default ClientLogon message by steamcmd.exe and I think we are sending the proto correctly.

This is what SteamCMD sends on anonymous logon:

image

image

This PR is ready for review.

@crossworth crossworth marked this pull request as ready for review September 4, 2020 19:14
@crossworth crossworth marked this pull request as draft September 6, 2020 16:17
@crossworth
Copy link
Author

After a few more "real world" tests I find that this implementation is not that good.

For example I need to specify the Cell ID while logging anonymously. We could ofcourse add an details param, but if we do that, would be better handle the in the LogOn method.

Maybe we could remove this checks:

if details.Username == "" {
    return errors.New("steam/auth: username must be set")
}

if details.Password == "" && details.LoginKey == "" {
    return errors.New("steam/auth: Password or LoginKey must be set")
}

And make the logOn more like the NodeJS implementation:
https://github.com/DoctorMcKay/node-steam-user/blob/master/components/logon.js#L204

I will leave this PR open since there is no issues enable on this repo, but fell free to close it.

@crossworth crossworth closed this Nov 26, 2020
@crossworth crossworth deleted the support-anonymous-logon branch November 26, 2020 15:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant