profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/cretz/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

cretz/bine 530

Go library for accessing and embedding Tor clients and servers

cretz/asmble 489

Compile WebAssembly to JVM and other WASM tools

cretz/doogie 269

A Chromium-based web browser with tree-style pages

cretz/dust-php 69

Powerful PHP templating engine based off of Dust JS

cretz/esgopeta 7

Go implementation of the Gun distributed graph database

Pull request review commentstackpath/backend-developer-tests

Add concurrency test

 from the stream vs program errors? How would you test this? Assume that `\n` end line of input. Was with the REST service test you're free to use any built-ins or  import any frameworks you like to do this. +## Concurrency++In some advanced situations, StackPath relies on Go's concurrency primitives to+perform asynchronous tasks. The `concurrency` directory contains two interfaces for+asynchronous task pools. Please write implementations that satisfy the two+interfaces.

Noted, and also noted that AdvancedPool is optional.

cretz

comment created time in 7 days

PullRequestReviewEvent

Pull request review commentstackpath/backend-developer-tests

Add concurrency test

+// Package concurrency implements worker pool interfaces, one simple and one a+// bit more complex.+package concurrency++import (+	"context"+	"errors"+)++// SimplePool is a simple worker pool that does not support cancellation or+// closing. All functions are safe to call from multiple goroutines.+type SimplePool interface {+	// Submit a task to be executed asynchronously. This function will return as+	// soon as the task is submitted. If the pool does not have an available slot+	// for the task, this blocks until it can submit.+	Submit(func())+}++// NewSimplePool creates a new SimplePool that only allows the given maximum+// concurrent tasks to run at any one time. maxConcurrent must be greater than+// zero.+func NewSimplePool(maxConcurrent int) SimplePool {+	panic("TODO")+}++// ErrPoolClosed is returned from AdvancedPool.Submit when the pool is closed+// before submission can be sent.+var ErrPoolClosed = errors.New("pool closed")++// AdvancedPool is a more advanced worker pool that supports cancelling the+// submission and closing the pool. All functions are safe to call from multiple+// goroutines.+type AdvancedPool interface {+	// Submit submits the given task to the pool, blocking until a slot becomes+	// available or the context is closed. The given context and its lifetime only+	// affects this function and is not the context passed to the callback. If the+	// context is closed before a slot becomes available, the context error is+	// returned. If the pool is closed before a slow becomes available,

Fixed, thanks

cretz

comment created time in 7 days

PullRequestReviewEvent

push eventcretz/backend-developer-tests

Chad Retz

commit sha 3b2fa2551d9cb39079b1016d2fb5f8212ea7bb84

Broke pools apart into separate files and made doc changes

view details

push time in 7 days

issue commentnodegui/nodegui

QWindow Support

Here's what I did on Windows using Go's Qt wrapper: https://github.com/cretz/ffembedpoc. That takes Firefox's window and makes it a control. Granted it has to turn off its tabs and communicates over a control point, but idea is there.

(I have plenty of familiarity w/ Qt C++, but trying to find a binding that encourages more contributions)

cretz

comment created time in 8 days

create barnchcretz/backend-developer-tests

branch : concurrency-test

created branch time in 9 days

fork cretz/backend-developer-tests

Exercises for potential backend developers looking to deliver the world's best edge platform with an amazing team

https://stackpath.applytojob.com/

fork in 9 days

issue commentcretz/go-sqleet

Can't install on Linux

That file comes from https://github.com/mattn/go-sqlite3. Are you able to build that project?

lillem4n

comment created time in 15 days

issue commentcretz/bine

Dialer: diagnose network connection issues?

The dialer is just a SOCKS proxy at https://github.com/cretz/bine/blob/2d69661a2441f449d2d9ec15ab033252b82af08f/tor/dialer.go#L81 like any other socks proxy using Tor. You can probably set StartConf.NoHush to true which will not set --hush on the CLI when starting Tor. You can also create a torrc file with Log options (see manual) and set that as StartConf.TorrcFile.

You can probably also get lots of information over the control port. I haven't investigated to see which ones might help you, but Tor.Control has several things you can run to inspect Tor's state (like seeing which circuits are open, or trying to build them, or even getting descriptors for onion services). The details of calls that can be made on the control port are at https://github.com/torproject/torspec/blob/main/control-spec.txt.

tgbv

comment created time in 19 days

issue commentcretz/software-ideas

Machine Code to WASM Compiler

Nice! Afraid I don't have any intentions or insight on doing this, but I do agree it would be cool.

cretz

comment created time in 21 days

issue commentcretz/asmble

Error in command 'compile': Class too large: MyClass

Looks like just too many constants. I'd have to dig into seeing what constants asmble is generating, but short of changing how asmble works, I don't think there's an easy fix.

MihaelIsaev

comment created time in 21 days

issue openedk6io/k6

Document limitation on Go JS bridge when returning only a single error type

Feature Description

Today at https://github.com/k6io/k6/blob/cc0361ca4a5443e5b90d22b4c0e62a9f15c9757d/js/common/bridge.go#L151 you must have more than one return value to propagate Go errors. This surprised my developing a side-effect-only function that just returned a single error. I now return (struct{}, error) to have my Go error seen as a real error and not just a single value return.

Suggested Solution

Assuming this is by intention, should document this somewhere. Currently k6 Extensions in the docs links to https://k6.io/blog/extending-k6-with-xk6/ which states:

If err is not nil, it will be thrown with the appropriate message in the JS script.

Though it's understandable that a high-level blog post won't have this detail. Unsure where to document it, just thought I'd point out the surprise. I suppose a single-error-only-return func test has value at https://github.com/k6io/k6/blob/master/js/common/bridge_test.go to affirm behavior.

created time in a month

issue openedstephenh/ts-proto

Service and message name clash across proto packages

Given a proto w/ a message named Foo in somedir1/foo.proto and a service named Foo in somedir2/foo.proto that references the Foo message from somedir1/foo.proto, you'll get an error on the import { Foo } from "../somedir1/foo"; with:

Import declaration conflicts with local declaration of 'Foo'

created time in a month

create barnchcretz/tor-static

branch : tor-0.4.6.5

created branch time in a month

issue commentldsec/lattigo

Some question about fully threshold FHE in lattigo

Can the answer be placed here and/or can a public link to the mailing list archive be provided?

HIT1180300227

comment created time in a month

startedldsec/lattigo

started time in a month

issue commentcretz/bine

Add Onionbalance Support

Onionbalance for v3 relies on a recent PR at https://github.com/torproject/tor/pull/1647 (discussion at https://gitlab.torproject.org/tpo/core/tor/-/issues/32709) which only applies to torrc-based onion services, not ephemeral ones via ADD_ONION. Mailing list discussion started at https://lists.torproject.org/pipermail/tor-dev/2021-June/014570.html.

I may also look into impl'ing a poc of this PDF which discusses multiple instances using the same hostname and priv key.

cretz

comment created time in a month

startedasn-d6/onionbalance

started time in 2 months

issue openedcretz/bine

Add Onionbalance Support

At least need an example showing it, if not helpers to make it easy.

created time in 2 months

issue commentcretz/bine

Support embedded control socket on Windows

Adding help wanted tag. Until the Go issues mentioned in the PR at #13 are done, this would be a manual effort w/ syscall.

cretz

comment created time in 2 months

issue closedcretz/bine

Onion ID length

Is it possible to change the length of onion ID that we get, i.e. can ask for greater sized onion ID that we get from the following code?

onion, err := t.Listen(listenCtx, &tor.ListenConf{Version3: true, RemotePorts: []int{80}})

closed time in 2 months

aayushsinha44

issue commentcretz/bine

Segmentation fault when running example client on linux

Closing old issue. Let mw know if this issue persists.

cauefcr

comment created time in 2 months

issue closedcretz/bine

Segmentation fault when running example client on linux

linux 4.19, tor 0.4.0.5. I was trying to run the example client code to create communicating hidden services, but i couldn't get the example code to run on my manjaro linux.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x63cf53]

goroutine 24 [running]:
golang.org/x/net/proxy.(*socks5).Dial(0xc00009ec30, 0x6f2455, 0x3, 0xc0000966a0, 0xf, 0xf, 0x0, 0x28a, 0x0)
	/home/h/go/src/golang.org/x/net/proxy/socks5.go:71 +0x63
github.com/cretz/bine/tor.(*Dialer).DialContext.func1(0xc000085180, 0x6f2455, 0x3, 0xc0000966a0, 0xf, 0xc00009aa80, 0x754200, 0xc000096010, 0xc00009aae0)
	/home/h/go/src/github.com/cretz/bine/tor/dialer.go:95 +0x7e
created by github.com/cretz/bine/tor.(*Dialer).DialContext
	/home/h/go/src/github.com/cretz/bine/tor/dialer.go:94 +0xfa
exit status 2

the code was:

package main

import (
	"context"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"time"

	"github.com/cretz/bine/tor"
)

func main() {
	if err := run(); err != nil {
		log.Fatal(err)
	}
}

func run() error {
	// Start tor with default config (can set start conf's DebugWriter to os.Stdout for debug logs)
	fmt.Println("Starting tor and fetching title of https://eludemaillhqfkh5.onion, please wait a few seconds...")
	t, err := tor.Start(nil, nil)
	if err != nil {
		return err
	}
	defer t.Close()
	// Wait at most a minute to start network and get
	dialCtx, dialCancel := context.WithTimeout(context.Background(), time.Minute)
	defer dialCancel()
	// Make connection
	dialer, err := t.Dialer(dialCtx, nil)
	if err != nil {
		return err
	}
	httpClient := &http.Client{Transport: &http.Transport{DialContext: dialer.DialContext}}
	// Get /
	resp, err := httpClient.Get("https://example.com")
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if err != nil {
		return err
	}
	bodyBytes, err := ioutil.ReadAll(resp.Body)
	fmt.Println(string(bodyBytes))
	return nil
}

A slight variation on the example client.

closed time in 2 months

cauefcr

issue commentcretz/bine

[Proposal] Support port mapping in tor/listen.go

if I revisit this, I think I may accept a port-mappings structure that will be mutually exclusive with the existing local/remote port pieces. This will give the most flexibility.

parazyd

comment created time in 2 months

issue commentcretz/bine

Onion ID length

Closing. Please comment if this is still an issue.

aayushsinha44

comment created time in 2 months

issue commentcretz/bine

EnableNetwork ignores `wait` if already enabled

Hrmm, I suppose the fix here is to have enable network check bootstrapped even when already enabled. May still have event part ahead of time set per #40. Will investigate.

karalabe

comment created time in 2 months

issue commentcretz/bine

Onion creation and event listening race

Will look to moving event capture asynchronous and before the sending of the conf. Same at #40.

karalabe

comment created time in 2 months

issue commentcretz/bine

EnableNetwork and event listening race

Will look to moving event capture asynchronous and before the sending of the conf.

karalabe

comment created time in 2 months