Skip to content

HTTP2 stream id difference in "HEADERS" frame_type of Firefox mimic #400

@plzcloseyoureyes

Description

@plzcloseyoureyes

Describe the bug
Testing was made on https://tls.peet.ws/api/all
Image
Left is azure, right is Firefox 143 latest on Windows.
There's a difference in the stream_id, not an expert but i would guess it could be used to detect the client.

To Reproduce

package main

import (
	"fmt"

	"github.com/Noooste/azuretls-client"
)

func main() {
	session := azuretls.NewSession()
	session.Browser = azuretls.Firefox
	session.InsecureSkipVerify = true

	response, err := session.Do(&azuretls.Request{
		Method: "GET", // Changed to POST since we're sending a body
		Url:    "https://tls.peet.ws/api/all",
		OrderedHeaders: azuretls.OrderedHeaders{
			{"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0"},
			{"Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
			{"Accept-Language", "en-US,en;q=0.5"},
			{"Accept-Encoding", "gzip, deflate, br, zstd"},
			{"Upgrade-Insecure-Requests", "1"},
			{"Sec-Fetch-Dest", "document"},
			{"Sec-Fetch-Mode", "navigate"},
			{"Sec-Fetch-Site", "none"},
			{"Sec-Fetch-User", "?1"},
			{"Priority", "u=0, i"},
			{"Te", "trailers"},
		},
		InsecureSkipVerify: true,
	})

	if err != nil {
		panic(err)
	}

	fmt.Println(response.Header["Content-Encoding"])
	fmt.Println(response.HttpResponse.Proto)
	fmt.Println(response.String())
} 

Expected behavior
when Browser is set to Firefox stream_id of "HEADERS" on http2 should be identical to this of a real Firefox browser

Additional context
stream_id is persistent across macOS and Windows on latest Firefox, shows 3. on Chrome its 1 so its good for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions