From users-return-5240-apmail-trafficserver-users-archive=trafficserver.apache.org@trafficserver.apache.org Sun Oct 25 00:57:00 2015 Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0926210D55 for ; Sun, 25 Oct 2015 00:57:00 +0000 (UTC) Received: (qmail 38281 invoked by uid 500); 25 Oct 2015 00:56:59 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 38224 invoked by uid 500); 25 Oct 2015 00:56:59 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 38214 invoked by uid 99); 25 Oct 2015 00:56:59 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Oct 2015 00:56:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 460F41A079F for ; Sun, 25 Oct 2015 00:56:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id v14grvkRJbj0 for ; Sun, 25 Oct 2015 00:56:51 +0000 (UTC) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 8A701439DD for ; Sun, 25 Oct 2015 00:56:51 +0000 (UTC) Received: by iofz202 with SMTP id z202so155879361iof.2 for ; Sat, 24 Oct 2015 17:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wfdHyBAYtdeRfcZGtapl1QjtJzDLGZ3pZpILtwcHK60=; b=qNyui7IdSMaqrgDSMUJaxTWLL65FS4hdWLDQ/WeVPgPPhjDeLTwunhHO3T7kS/Mq+q QIdAzNadIN61EjCoCZZYhzXfO5urSFbR1y895kP1AuTPaBhAvJ38MDmycKEayMvFNvzK ONN8RbHdsPGLtAYEVlZ+bTabCbsCJ71a4xfhO3w8dcdFQNC9Hbz/0F3uT+let0/NQePa HVKIc2F+6Y94NzTIBp1kKWb+mqiKE5luQAIzZ52tt7XP+kqufTIy8Tjknnc8jB4LQY5v ipP4ZrUkzH3p17+ZmdorN0GSdz4sqNhuW77gaf6a/GukXC1eWXNLPaIPhqjwlBpeXBHU 5rLg== MIME-Version: 1.0 X-Received: by 10.107.164.36 with SMTP id n36mr10377813ioe.88.1445734604831; Sat, 24 Oct 2015 17:56:44 -0700 (PDT) Received: by 10.107.165.18 with HTTP; Sat, 24 Oct 2015 17:56:44 -0700 (PDT) In-Reply-To: References: Date: Sat, 24 Oct 2015 17:56:44 -0700 Message-ID: Subject: Re: Remap rules for HTTPS From: Shu Kit Chan To: "users@trafficserver.apache.org" Content-Type: multipart/alternative; boundary=001a114220ac8f800e0522e3512d --001a114220ac8f800e0522e3512d Content-Type: text/plain; charset=UTF-8 Is it only the problem of ts_lua plugin or other plugins have the same problem? e.g. you can try the regex_remap or header_rewrite plugin and see if you have the same problem? Kit On Sat, Oct 24, 2015 at 5:41 PM, Vishwas Manral wrote: > Also ATS version is 5.3.1. > > -Vishwas > > On Sat, Oct 24, 2015 at 5:39 PM, Vishwas Manral > wrote: > >> Thanks Shu Kit for the very prompt response. >> >> My script is not being called at all for HTTPS - it does get called for >> HTTP - that is the problem I am trying to resolve. I tried just map/ >> map_with recv_port and other options but the same result. >> >> -Vishwas >> >> On Sat, Oct 24, 2015 at 5:36 PM, Shu Kit Chan >> wrote: >> >>> Perhaps you can turn on the debug to see what's going on and whether the >>> script is actually being called or not. >>> You can use ts.debug() in the lua script to print out something out to >>> help you debug as well. >>> >>> Also, perhaps you can share what "x.lua" is doing so that we can know >>> more about your use case? >>> >>> Thanks. >>> >>> Kit >>> >>> On Sat, Oct 24, 2015 at 5:20 PM, Vishwas Manral >>> wrote: >>> >>>> Hi, >>>> >>>> I was trying to use ATS 5.1.0 as a reverse proxy. >>>> >>>> I am able to remap HTTP traffic however not able to do the same for >>>> HTTPS using the tslua plugin. If I put code pointer in plugin.config that >>>> code is invoked - while the rules of remap.config do not work. The rules >>>> are as below: >>>> >>>> regex_map_with_recv_port http://.*: http://.*:>>> number1> @plugin=/opt/ats/libexec/trafficserver/tslua.so @pparam=x.lua >>>> @pparam=MON >>>> >>>> regex_map_with_recv_port https://.*: https://.*: >>> number2> @plugin=/opt/ats/libexec/trafficserver/tslua.so @pparam=x.lua >>>> @pparam=MON >>>> >>>> The first one works the second doesn't. The diag seems to say the certs >>>> are loaded correctly >>>> >>>> [Oct 24 23:59:07.191] Server {0x2b1b1a82XXXX} NOTE: loading SSL >>>> certificate configuration from >>>> /opt/ats/etc/trafficserver/ssl_multicert.config >>>> >>>> What could I be doing wrong? >>>> >>>> Thanks, >>>> Vishwas >>>> >>> >>> >> > --001a114220ac8f800e0522e3512d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Is it only the problem of ts_lua plugin or other plugins h= ave the same problem? e.g. you can try the regex_remap or header_rewrite pl= ugin and see if you have the same problem?

Kit

On Sat, Oct 24,= 2015 at 5:41 PM, Vishwas Manral <vishwas.ietf@gmail.com> wrote:
Also ATS versi= on is 5.3.1.

<= div>-Vishwas

On Sat, Oct 24, 2015 at 5:39 PM, Vish= was Manral <vishwas.ietf@gmail.com> wrote:
Thanks Shu Kit for the very prompt r= esponse.=C2=A0

My script is not being called at all for = HTTPS - it does get called for HTTP - that is the problem I am trying to re= solve. I tried just map/ map_with recv_port and other options but the same = result.

-Vishwas

On Sat, Oct 24, 2015 at 5:36 PM, Shu Kit Chan <chanshukit@gmail.com<= /a>> wrote:
Pe= rhaps you can turn on the debug to see what's going on and whether the = script is actually being called or not.
You can use ts.debug() in the l= ua script to print out something out to help you debug as well.
<= br>
Also, perhaps you can share what "x.lua" is doing s= o that we can know more about your use case?

Thank= s.

Kit
<= /span>

On Sat, Oct 24, 2015 at 5:20 PM, Vishwas Manral <= vishwas.ietf@gm= ail.com> wrote:
Hi,

I was trying to use ATS 5.1.0 as a reverse pro= xy.

I am able to remap HTTP traffic however not ab= le to do the same for HTTPS using the tslua plugin. If I put code pointer i= n plugin.config that code is invoked - while the rules of remap.config do n= ot work. The rules are as below:

regex_map_wi= th_recv_port http://.*:<port number1> http://.*:<port number1> = @plugin=3D/opt/ats/libexec/trafficserver/tslua.so @pparam=3Dx.lua @pparam= =3DMON

regex_map_with_recv_port https:/= /.*:<port number2> https://.*: <port number2> @plugin=3D/opt/at= s/libexec/trafficserver/tslua.so @pparam=3Dx.lua @pparam=3DMON
<= div>
The first one works the second doesn't. The diag see= ms to say the certs are loaded correctly

[Oct= 24 23:59:07.191] Server {0x2b1b1a82XXXX} NOTE: loading SSL certificate con= figuration from /opt/ats/etc/trafficserver/ssl_multicert.config
=

What could I be doing wrong?=C2=A0

=
Thanks,
Vishwas




--001a114220ac8f800e0522e3512d--