Skip to content

Commit

Permalink
fix: fixes dns problem to redirect them to proxy in test mode (#1850)
Browse files Browse the repository at this point in the history
* fix: fixes dns problem to redirect them to proxy in test mode

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>

* fix: fixes linting issues in core.go

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>

---------

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
  • Loading branch information
re-Tick committed Apr 24, 2024
1 parent eed5404 commit 7e6c138
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/core/core.go
Expand Up @@ -130,6 +130,7 @@ func (c *Core) Hook(ctx context.Context, id uint64, opts models.HookOptions) err
Pid: 0,
IsDocker: isDocker,
KeployIPV4: a.KeployIPv4Addr(),
Mode: opts.Mode,
})
if err != nil {
utils.LogError(c.logger, err, "failed to load hooks")
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/hooks/hooks.go
Expand Up @@ -445,7 +445,7 @@ func (h *Hooks) load(_ context.Context, opts core.HookCfg) error {

h.logger.Info("keploy initialized and probes added to the kernel.")

switch models.GetMode() {
switch opts.Mode {
case models.MODE_RECORD:
err := h.SetKeployModeInKernel(1)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/core/service.go
Expand Up @@ -24,6 +24,7 @@ type HookCfg struct {
Pid uint32
IsDocker bool
KeployIPV4 string
Mode models.Mode
}

type App interface {
Expand Down

0 comments on commit 7e6c138

Please sign in to comment.