Skip to content

Commit

Permalink
README: remove go-re2 section
Browse files Browse the repository at this point in the history
It is not used anymore.
  • Loading branch information
starius committed Oct 21, 2024
1 parent d3172dc commit a90388a
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions gopasta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@ for the given Go version and this package version.
The binary is self-contained, so if needed you can move it to another machine
with the same OS and CPU architecture and run there.

### Using C++ RE2

If you send a one time link in some chat (e.g. discord), its crawler will try to
load link preview and would [expire the link][issue8], if not the protection
that we have. The crawlers are detected and blocked in one-time links, so they
do not expire. Regular expressions matching against all the crawlers User Agent
strings is done using [go-re2](https://github.com/wasilibs/go-re2) library which
is very fast. To make this matching even faster (~3 times), you can build
against C++ version of RE2 library:

```
sudo apt-get install libre2-dev
sudo apt-get install build-essential pkg-config
go build -trimpath -ldflags="-s -w -buildid=" -tags re2_cgo -o gopasta
```

The library is linked dynamically, so it has to be installed on the system
on which it is run.

[issue8]: https://github.com/starius/pasta/issues/8

## Run it on server

First generate encryption password:
Expand Down

0 comments on commit a90388a

Please sign in to comment.