From users-return-5239-apmail-trafficserver-users-archive=trafficserver.apache.org@trafficserver.apache.org Sun Oct 25 00:42:07 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 18BA610CF6 for ; Sun, 25 Oct 2015 00:42:07 +0000 (UTC) Received: (qmail 29869 invoked by uid 500); 25 Oct 2015 00:42:06 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 29809 invoked by uid 500); 25 Oct 2015 00:42:06 -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 29797 invoked by uid 99); 25 Oct 2015 00:42:06 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Oct 2015 00:42:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 468AC180E04 for ; Sun, 25 Oct 2015 00:42:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 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, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Z6aNTtQw8Mvz for ; Sun, 25 Oct 2015 00:41:58 +0000 (UTC) Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 7221042B60 for ; Sun, 25 Oct 2015 00:41:57 +0000 (UTC) Received: by qgeo38 with SMTP id o38so95045596qge.0 for ; Sat, 24 Oct 2015 17:41:51 -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=BZckeu0aN3GlxGnqaSec1TaHPsPJXlH2VhCXZWogeCM=; b=u9IMOGCa83ip+TOHPnMUopmiGKaBV3CRtTLinLPB4RxajOk5Px2vQP6E21xgWBYhRp tdbnQTpTK9ixR/V6vAqLaqvCKiFo3EuEPYW++7M4bSKTbnTCXu/i0BHyiJVqjRx4A782 oaBWtrJ86do2iaagUndtgAuFtuq/N4EnHxyd04lBlnxwazdeNToTZ/wt+voiAiTtZX5t n/DNB//GSILLvUoRnBbPbVk1VwVadOED21p2pTP5pYIfgosbTittKYteoAqB1rZ5PjU5 hAjTPXod+loqndD+zWPq4QXgF71pUveqXq2gcvuy7JvWfHb5lDsrKcC5xvMeUbhkRvLL Uh5g== MIME-Version: 1.0 X-Received: by 10.140.34.75 with SMTP id k69mr27239310qgk.64.1445733711619; Sat, 24 Oct 2015 17:41:51 -0700 (PDT) Received: by 10.140.94.80 with HTTP; Sat, 24 Oct 2015 17:41:51 -0700 (PDT) In-Reply-To: References: Date: Sat, 24 Oct 2015 17:41:51 -0700 Message-ID: Subject: Re: Remap rules for HTTPS From: Vishwas Manral To: users@trafficserver.apache.org Content-Type: multipart/alternative; boundary=001a11c0d406522a790522e31c26 --001a11c0d406522a790522e31c26 Content-Type: text/plain; charset=UTF-8 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 >>> >> >> > --001a11c0d406522a790522e31c26 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Also ATS version is 5.3.1.

-Vishwas

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

My script is not be= ing called at all for HTTPS - it does get called for HTTP - that is the pro= blem 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 <chanshukit@gmail.com> wrote:
Perhaps you can turn on t= he debug to see what's going on and whether the script is actually bein= g called or not.
You can use ts.debug() in the lua script to print out = something out to help you debug as well.

Also, per= haps you can share what "x.lua" is doing so that we can know more= about your use case?

Thanks.

Kit
<= div class=3D"gmail_extra">
On Sat, Oct 24, 20= 15 at 5:20 PM, Vishwas Manral <vishwas.ietf@gmail.com> = 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 H= TTPS using the tslua plugin. If I put code pointer in plugin.config that co= de is invoked - while the rules of remap.config do not work. The rules are = as below:

regex_map_with_recv_port http://.*:= <port number1> http://.*:<port number1> @plugin=3D/opt/ats/libe= xec/trafficserver/tslua.so @pparam=3Dx.lua @pparam=3DMON
regex_map_with_recv_port https://.*:<port number2> = https://.*: <port number2> @plugin=3D/opt/ats/libexec/trafficserver/t= slua.so @pparam=3Dx.lua @pparam=3DMON

The fi= rst one works the second doesn't. The diag seems to say the certs are l= oaded 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?=C2=A0

Thanks,
Vi= shwas



--001a11c0d406522a790522e31c26--