Read socketHarOutChannel instead of filteredHarChannel

This commit is contained in:
M. Mert Yildiran 2021-08-20 00:56:19 +03:00
parent 061cb098e9
commit 163fc7c4ae
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
2 changed files with 14 additions and 9 deletions

3
.gitignore vendored
View File

@ -20,3 +20,6 @@ build
# Mac OS
.DS_Store
.vscode/
# Ignore the scripts that are created for development
*dev.*

View File

@ -4,13 +4,6 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/romana/rlog"
"github.com/up9inc/mizu/shared"
"github.com/up9inc/mizu/tap"
tapApi "github.com/up9inc/mizu/tap/api"
"mizuserver/pkg/api"
"mizuserver/pkg/models"
"mizuserver/pkg/routes"
@ -18,6 +11,14 @@ import (
"net/http"
"os"
"os/signal"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/romana/rlog"
"github.com/up9inc/mizu/shared"
"github.com/up9inc/mizu/tap"
tapApi "github.com/up9inc/mizu/tap/api"
)
var tapperMode = flag.Bool("tap", false, "Run in tapper mode without API")
@ -71,10 +72,11 @@ func main() {
api.StartResolving(*namespace)
socketHarOutChannel := make(chan *tapApi.OutputChannelItem, 1000)
filteredHarChannel := make(chan *tapApi.OutputChannelItem)
// TODO: filtered does not work
// filteredHarChannel := make(chan *tapApi.OutputChannelItem)
// go filterHarItems(socketHarOutChannel, filteredHarChannel, getTrafficFilteringOptions())
go api.StartReadingEntries(filteredHarChannel, nil)
go api.StartReadingEntries(socketHarOutChannel, nil)
hostApi(socketHarOutChannel)
}