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

fix(oonimkall): make sure SoftwareName is set #1425

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/ooapi/checkin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewDescriptorCheckIn(
AcceptEncodingGzip: true, // we want a small response
Authorization: "",
ContentType: httpapi.ApplicationJSON,
LogBody: false, // we don't want to log psiphon config
LogBody: true,
MaxBodySize: 0,
Method: http.MethodPost,
Request: &httpapi.RequestDescriptor[*model.OOAPICheckInConfig]{
Expand Down
2 changes: 1 addition & 1 deletion internal/ooapi/checkin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestNewDescriptorCheckIn(t *testing.T) {
t.Fatalf("unexpected desc.%s", name)
}
case "LogBody":
if !field.IsZero() {
if field.IsZero() {
t.Fatalf("unexpected desc.%s", name)
}
case "MaxBodySize":
Expand Down
1 change: 1 addition & 0 deletions pkg/oonimkall/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ func (sess *Session) CheckIn(ctx *Context, config *CheckInConfig) (*CheckInInfo,
ProbeASN: info.ASNString(),
ProbeCC: info.CountryCode,
RunType: model.RunType(config.RunType),
SoftwareName: config.SoftwareName,
SoftwareVersion: config.SoftwareVersion,
WebConnectivity: config.WebConnectivity.toModel(),
}
Expand Down